Skip to content

Commit 2a2ce97

Browse files
committed
removed UnityEditor.L10n
1 parent 59d3882 commit 2a2ce97

1 file changed

Lines changed: 34 additions & 30 deletions

File tree

Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,65 @@
1-
using UnityEditor;
2-
1+
// Got rid of UnityEditor.L10n dependency for runtime usage
32
namespace OneJS.CustomStyleSheets {
43
public class StyleSheetImportGlossary {
5-
public readonly string internalError = L10n.Tr("Internal import error: {0}");
4+
static string Tr(string text) {
5+
// Plug your own localization here later if needed
6+
return text;
7+
}
8+
9+
public readonly string internalError = Tr("Internal import error: {0}");
610

7-
public readonly string internalErrorWithStackTrace = L10n.Tr("Internal import error: {0}\n{1}");
11+
public readonly string internalErrorWithStackTrace = Tr("Internal import error: {0}\n{1}");
812

9-
public readonly string error = L10n.Tr("error");
13+
public readonly string error = Tr("error");
1014

11-
public readonly string warning = L10n.Tr("warning");
15+
public readonly string warning = Tr("warning");
1216

13-
public readonly string line = L10n.Tr("line");
17+
public readonly string line = Tr("line");
1418

15-
public readonly string column = L10n.Tr("column");
19+
public readonly string column = Tr("column");
1620

17-
public readonly string unsupportedUnit = L10n.Tr("Unsupported unit: '{0}'");
21+
public readonly string unsupportedUnit = Tr("Unsupported unit: '{0}'");
1822

19-
public readonly string ussParsingError = L10n.Tr("USS parsing error: {0}");
23+
public readonly string ussParsingError = Tr("USS parsing error: {0}");
2024

21-
public readonly string unsupportedTerm = L10n.Tr("Unsupported USS term: `{0}` ({1})");
25+
public readonly string unsupportedTerm = Tr("Unsupported USS term: `{0}` ({1})");
2226

23-
public readonly string missingFunctionArgument = L10n.Tr("Missing function argument: '{0}'");
27+
public readonly string missingFunctionArgument = Tr("Missing function argument: '{0}'");
2428

25-
public readonly string missingVariableName = L10n.Tr("Missing variable name");
29+
public readonly string missingVariableName = Tr("Missing variable name");
2630

27-
public readonly string emptyVariableName = L10n.Tr("Empty variable name");
31+
public readonly string emptyVariableName = Tr("Empty variable name");
2832

29-
public readonly string tooManyFunctionArguments = L10n.Tr("Too many function arguments");
33+
public readonly string tooManyFunctionArguments = Tr("Too many function arguments");
3034

31-
public readonly string emptyFunctionArgument = L10n.Tr("Empty function argument");
35+
public readonly string emptyFunctionArgument = Tr("Empty function argument");
3236

33-
public readonly string unexpectedTokenInFunction = L10n.Tr("Expected ',', got '{0}'");
37+
public readonly string unexpectedTokenInFunction = Tr("Expected ',', got '{0}'");
3438

35-
public readonly string missingVariablePrefix = L10n.Tr("Variable '{0}' is missing '--' prefix");
39+
public readonly string missingVariablePrefix = Tr("Variable '{0}' is missing '--' prefix");
3640

37-
public readonly string invalidHighResAssetType = L10n.Tr("Unsupported type {0} for asset at path '{1}' ; only Texture2D is supported for variants with @2x suffix\nSuggestion: verify the import settings of this asset.");
41+
public readonly string invalidHighResAssetType = Tr("Unsupported type {0} for asset at path '{1}' ; only Texture2D is supported for variants with @2x suffix\nSuggestion: verify the import settings of this asset.");
3842

39-
public readonly string invalidSelectorListDelimiter = L10n.Tr("Invalid selector list delimiter: '{0}'");
43+
public readonly string invalidSelectorListDelimiter = Tr("Invalid selector list delimiter: '{0}'");
4044

41-
public readonly string invalidComplexSelectorDelimiter = L10n.Tr("Invalid complex selector delimiter: '{0}'");
45+
public readonly string invalidComplexSelectorDelimiter = Tr("Invalid complex selector delimiter: '{0}'");
4246

43-
public readonly string unsupportedSelectorFormat = L10n.Tr("Unsupported selector format: '{0}'");
47+
public readonly string unsupportedSelectorFormat = Tr("Unsupported selector format: '{0}'");
4448

45-
public readonly string selectorStartsWithDigitFormat = L10n.Tr("Unsupported selector format. Selector names can not start with a digit. '{0}'");
49+
public readonly string selectorStartsWithDigitFormat = Tr("Unsupported selector format. Selector names can not start with a digit. '{0}'");
4650

47-
public readonly string unknownFunction = L10n.Tr("Unknown function '{0}' in declaration '{1}: {0}'");
51+
public readonly string unknownFunction = Tr("Unknown function '{0}' in declaration '{1}: {0}'");
4852

49-
public readonly string circularImport = L10n.Tr("Circular @import dependencies detected. All @import directives will be ignored for this StyleSheet.");
53+
public readonly string circularImport = Tr("Circular @import dependencies detected. All @import directives will be ignored for this StyleSheet.");
5054

51-
public readonly string invalidUriLocation = L10n.Tr("Invalid URI location: '{0}'");
55+
public readonly string invalidUriLocation = Tr("Invalid URI location: '{0}'");
5256

53-
public readonly string invalidUriScheme = L10n.Tr("Invalid URI scheme: '{0}'");
57+
public readonly string invalidUriScheme = Tr("Invalid URI scheme: '{0}'");
5458

55-
public readonly string invalidAssetPath = L10n.Tr("Invalid asset path: '{0}'");
59+
public readonly string invalidAssetPath = Tr("Invalid asset path: '{0}'");
5660

57-
public readonly string invalidAssetType = L10n.Tr("Unsupported type {0} for asset at path '{1}' ; only the following types are supported: {2}\nSuggestion: verify the import settings of this asset.");
61+
public readonly string invalidAssetType = Tr("Unsupported type {0} for asset at path '{1}' ; only the following types are supported: {2}\nSuggestion: verify the import settings of this asset.");
5862

59-
public readonly string unknownPsuedoClass = L10n.Tr("Unknown psuedo class '{0}' in selector '{1}`");
63+
public readonly string unknownPsuedoClass = Tr("Unknown psuedo class '{0}' in selector '{1}`");
6064
}
6165
}

0 commit comments

Comments
 (0)