Skip to content

Commit 65d8917

Browse files
committed
修复错误
1 parent 0f95386 commit 65d8917

File tree

8 files changed

+8
-8
lines changed

8 files changed

+8
-8
lines changed

CodeService/src/FormatElement/AlignmentElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void AlignmentElement::Diagnosis(DiagnosisContext& ctx, int position, FormatElem
3232
auto character = ctx.GetColumn(nextOffset);
3333
if (character != _alignmentPosition)
3434
{
35-
ctx.PushDiagnosis(format(T("'=' should align to character {}"), _alignmentPosition),
35+
ctx.PushDiagnosis(format(LText("'=' should align to character {}"), _alignmentPosition),
3636
TextRange(nextOffset, nextOffset + 1));
3737
}
3838
}

CodeService/src/FormatElement/DiagnosisContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ std::vector<LuaDiagnosisInfo> DiagnosisContext::GetDiagnosisInfos()
112112
{
113113
LuaDiagnosisPosition start(line, _options.max_line_length);
114114
LuaDiagnosisPosition end(line, character);
115-
PushDiagnosis(format(T("The line width should not exceed {}"), _options.max_line_length), start, end);
115+
PushDiagnosis(format(LText("The line width should not exceed {}"), _options.max_line_length), start, end);
116116
}
117117
_lineMaxLengthMap.clear();
118118
}

CodeService/src/FormatElement/IndentElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void IndentElement::Diagnosis(DiagnosisContext& ctx, int position, FormatElement
3737
if (character != static_cast<int>(ctx.GetCurrentIndent()))
3838
{
3939
auto line = ctx.GetLine(range.StartOffset);
40-
ctx.PushDiagnosis(format(T("incorrect indentation {}, here need {} indent"),
40+
ctx.PushDiagnosis(format(LText("incorrect indentation {}, here need {} indent"),
4141
character, ctx.GetCurrentIndent()),
4242
LuaDiagnosisPosition(line, 0),
4343
LuaDiagnosisPosition(line, character)

CodeService/src/FormatElement/KeepBlankElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ void KeepBlankElement::Diagnosis(DiagnosisContext& ctx, int position, FormatElem
3434
{
3535
if (nextOffset - lastOffset - 1 != _blank)
3636
{
37-
ctx.PushDiagnosis(format(T("here need keep {} space"), _blank), TextRange(lastOffset, nextOffset));
37+
ctx.PushDiagnosis(format(LText("here need keep {} space"), _blank), TextRange(lastOffset, nextOffset));
3838
}
3939
}
4040
}

CodeService/src/FormatElement/KeepElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void KeepElement::Diagnosis(DiagnosisContext& ctx, int position, FormatElement&
5454
{
5555
if (nextOffset - lastOffset - 1 != _keepBlank)
5656
{
57-
ctx.PushDiagnosis(format(T("here need keep {} space"), _keepBlank), TextRange(lastOffset, nextOffset));
57+
ctx.PushDiagnosis(format(LText("here need keep {} space"), _keepBlank), TextRange(lastOffset, nextOffset));
5858
}
5959
}
6060
}

CodeService/src/FormatElement/KeepLineElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void KeepLineElement::Diagnosis(DiagnosisContext& ctx, int position, FormatEleme
5252

5353
if (_line != (nextElementLine - lastElementLine - 1))
5454
{
55-
ctx.PushDiagnosis(format(T("here need keep {} line"), _line),
55+
ctx.PushDiagnosis(format(LText("here need keep {} line"), _line),
5656
TextRange(lastElementOffset, nextElementOffset));
5757
}
5858
}

CodeService/src/FormatElement/MinLineElement.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@ void MinLineElement::Diagnosis(DiagnosisContext& ctx, int position, FormatElemen
5757

5858
if (_line > (nextElementLine - lastElementLine - 1))
5959
{
60-
ctx.PushDiagnosis(format(T("here need at least {} line"), _line), TextRange(lastOffset, nextOffset));
60+
ctx.PushDiagnosis(format(LText("here need at least {} line"), _line), TextRange(lastOffset, nextOffset));
6161
}
6262
}

include/CodeService/LanguageTranslator.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@ class LanguageTranslator
2020
/*
2121
* 语言本地化翻译实例,保持一种惯用法
2222
*/
23-
#define T(text) LanguageTranslator::GetInstance().Get(text)
23+
#define LText(text) LanguageTranslator::GetInstance().Get(text)
2424

0 commit comments

Comments
 (0)