diff --git a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/LanguageUtility.java b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/LanguageUtility.java index 2ec27632..b20c8b41 100644 --- a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/LanguageUtility.java +++ b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/LanguageUtility.java @@ -50,15 +50,15 @@ public final class LanguageUtility { * Gets the text for type of compilers for a language. * * @param language The language, not null. - * @return The text, not empty and not null. + * @return The text in sentence case, not empty and not null. */ - public static String getCompilerTextLower(Language language) { + public static String getCompilerText(Language language) { switch (language) { case ASM: - return "assembler"; // TODO: Have translation, so lower/upper is correct in German + return Texts.LANGUAGE_ASSEMBLER_TEXT; case PAS: - return "compiler"; + return Texts.LANGUAGE_COMPILER_TEXT; } throw new IllegalArgumentException("Unknown language '" + language + "'."); @@ -68,10 +68,10 @@ public final class LanguageUtility { public static String getCompilerPreferencesText(Language language) { switch (language) { case ASM: - return "Languages/Assemblers"; + return Texts.LANGUAGES_TITLE_CASE+"/"+Texts.LANGUAGE_ASSEMBLER_TEXT_TITLE_CASE; case PAS: - return "Languages/Compilers"; + return Texts.LANGUAGES_TITLE_CASE+"/"+Texts.LANGUAGE_COMPILER_TEXT_TITLE_CASE; } throw new IllegalArgumentException("Unknown language '" + language + "'."); diff --git a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts.java b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts.java index e4bb5d77..9c8c0b98 100644 --- a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts.java +++ b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts.java @@ -28,21 +28,14 @@ import org.eclipse.osgi.util.NLS; */ public final class Texts extends NLS { - public static String TOC_COMPILER_SYNTAX_YES; - public static String TOC_COMPILER_SYNTAX_NO; - public static String TOC_COMPILER_SYNTAX_BLOCK_DEFINITION_CHARACTERS; - public static String TOC_COMPILER_SYNTAX_COMPLETION_PROPOSAL_AUTO_ACTIVATION_CHARACTERS; - public static String TOC_COMPILER_SYNTAX_IDENTIFIER_PART_CHARACTERS; - public static String TOC_COMPILER_SYNTAX_IDENTIFIER_SEPARATOR_CHARACTER; - public static String TOC_COMPILER_SYNTAX_IDENTIFIER_START_CHARACTERS; - public static String TOC_COMPILER_SYNTAX_IDENTIFIERS_CASE_SENSITIVE; - public static String TOC_COMPILER_SYNTAX_INSTRUCTIONS_CASE_SENSITIVE; - public static String TOC_COMPILER_SYNTAX_LABEL_DEFINITION_SUFFIX_CHARACTER; - public static String TOC_COMPILER_SYNTAX_MACRO_USAGE_PREFIX_CHARACTER; - public static String TOC_COMPILER_SYNTAX_MULTIPLE_LINES_COMMENT_DELIMITERS; - public static String TOC_COMPILER_SYNTAX_SINGLE_LINE_COMMENT_DELIMITERS; - public static String TOC_COMPILER_SYNTAX_SOURCE_INCLUDE_DEFAULT_EXTENSION; - public static String TOC_COMPILER_SYNTAX_STRING_DELIMITERS; + /** + * Languages, + */ + public static String LANGUAGES_TITLE_CASE; + public static String LANGUAGE_ASSEMBLER_TEXT_TITLE_CASE; + public static String LANGUAGE_ASSEMBLER_TEXT; + public static String LANGUAGE_COMPILER_TEXT_TITLE_CASE; + public static String LANGUAGE_COMPILER_TEXT; /** * Compiler console. @@ -223,6 +216,22 @@ public final class Texts extends NLS { public static String TOC_COMPILER_INSTRUCTION_DESCRIPTION_LABEL; public static String TOC_COMPILER_MANUAL_TOPIC_LABEL; + public static String TOC_COMPILER_SYNTAX_YES; + public static String TOC_COMPILER_SYNTAX_NO; + public static String TOC_COMPILER_SYNTAX_BLOCK_DEFINITION_CHARACTERS; + public static String TOC_COMPILER_SYNTAX_COMPLETION_PROPOSAL_AUTO_ACTIVATION_CHARACTERS; + public static String TOC_COMPILER_SYNTAX_IDENTIFIER_PART_CHARACTERS; + public static String TOC_COMPILER_SYNTAX_IDENTIFIER_SEPARATOR_CHARACTER; + public static String TOC_COMPILER_SYNTAX_IDENTIFIER_START_CHARACTERS; + public static String TOC_COMPILER_SYNTAX_IDENTIFIERS_CASE_SENSITIVE; + public static String TOC_COMPILER_SYNTAX_INSTRUCTIONS_CASE_SENSITIVE; + public static String TOC_COMPILER_SYNTAX_LABEL_DEFINITION_SUFFIX_CHARACTER; + public static String TOC_COMPILER_SYNTAX_MACRO_USAGE_PREFIX_CHARACTER; + public static String TOC_COMPILER_SYNTAX_MULTIPLE_LINES_COMMENT_DELIMITERS; + public static String TOC_COMPILER_SYNTAX_SINGLE_LINE_COMMENT_DELIMITERS; + public static String TOC_COMPILER_SYNTAX_SOURCE_INCLUDE_DEFAULT_EXTENSION; + public static String TOC_COMPILER_SYNTAX_STRING_DELIMITERS; + public static String TOC_HARDWARES_TOPIC_LABEL; public static String TOC_HARDWARE_NAME_LABEL; public static String TOC_HARDWARE_ID_LABEL; diff --git a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts.properties b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts.properties index 813cf4a3..bf6ed10d 100644 --- a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts.properties +++ b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts.properties @@ -1,3 +1,9 @@ +LANGUAGES_TITLE_CASE=Languages +LANGUAGE_ASSEMBLER_TEXT_TITLE_CASE=Assembler +LANGUAGE_ASSEMBLER_TEXT=assembler +LANGUAGE_COMPILER_TEXT_TITLE_CASE=Compiler +LANGUAGE_COMPILER_TEXT=compiler + COMPILER_CONSOLE_TITLE=Compiler Console COMPILER_SOURCE_PARSER_TREE_OBJECT_TYPE_DEFAULT=Default diff --git a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts_de.properties b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts_de.properties index 79b45cbc..28011a3a 100644 --- a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts_de.properties +++ b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts_de.properties @@ -1,3 +1,9 @@ +LANGUAGES_TITLE_CASE=Sprachen +LANGUAGE_ASSEMBLER_TEXT_TITLE_CASE=Assembler +LANGUAGE_ASSEMBLER_TEXT=Assembler +LANGUAGE_COMPILER_TEXT_TITLE_CASE=Kompiler +LANGUAGE_COMPILER_TEXT=Kompiler + COMPILER_CONSOLE_TITLE=Kompiler Konsole COMPILER_SOURCE_PARSER_TREE_OBJECT_TYPE_DEFAULT=Default diff --git a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts_pl.properties b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts_pl.properties index 23561db1..4f90ef5b 100644 --- a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts_pl.properties +++ b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/Texts_pl.properties @@ -1,3 +1,9 @@ +LANGUAGES_TITLE_CASE=j\u0119zyki +LANGUAGE_ASSEMBLER_TEXT_TITLE_CASE=Assembler +LANGUAGE_ASSEMBLER_TEXT=assembler +LANGUAGE_COMPILER_TEXT_TITLE_CASE=Kompilator +LANGUAGE_COMPILER_TEXT=kompilator + COMPILER_CONSOLE_TITLE=Konsola kompilatora COMPILER_SOURCE_PARSER_TREE_OBJECT_TYPE_DEFAULT=Domy\u015Blny diff --git a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/compiler/CompilerDefinition.java b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/compiler/CompilerDefinition.java index 878e6817..2df74077 100644 --- a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/compiler/CompilerDefinition.java +++ b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/compiler/CompilerDefinition.java @@ -155,10 +155,10 @@ public final class CompilerDefinition implements Comparable /** * Gets the text for type of compilers for a language. * - * @return he text, not empty and not null. + * @return The text in sentence case, not empty and not null. */ - public final String getTextLower() { - return LanguageUtility.getCompilerTextLower(getLanguage()); + public final String getText() { + return LanguageUtility.getCompilerText(getLanguage()); } /** @@ -314,14 +314,14 @@ public final class CompilerDefinition implements Comparable if (!hasHelpDocuments()) { // INFO: The {0} '{1}' does not specify help documents. throw new CoreException(new Status(IStatus.INFO, LanguagePlugin.ID, - TextUtility.format(Texts.MESSAGE_E102, getTextLower(), getName()))); + TextUtility.format(Texts.MESSAGE_E102, getText(), getName()))); } String compilerPreferencesText = LanguageUtility.getCompilerPreferencesText(language); if (StringUtility.isEmpty(compilerExecutablePath)) { // ERROR: Help for the '{0}' {1} cannot be displayed because the path to the // compiler executable is not set in the {2} preferences. throw new CoreException(new Status(IStatus.ERROR, LanguagePlugin.ID, - TextUtility.format(Texts.MESSAGE_E130, getTextLower(), getName(), compilerPreferencesText))); + TextUtility.format(Texts.MESSAGE_E130, getText(), getName(), compilerPreferencesText))); } return CompilerHelp.getInstalledHelpDocuments(getHelpDocuments(), compilerExecutablePath); @@ -383,7 +383,7 @@ public final class CompilerDefinition implements Comparable // ERROR: Help for the {0} '{1}' cannot be displayed because no help file was // found in the paths relative to the executable path '{2}'. throw new CoreException(new Status(IStatus.ERROR, LanguagePlugin.ID, - TextUtility.format(Texts.MESSAGE_E131, getTextLower(), getName(), compilerExecutablePath))); + TextUtility.format(Texts.MESSAGE_E131, getText(), getName(), compilerExecutablePath))); } return result; diff --git a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/editor/LanguageEditorCompileCommand.java b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/editor/LanguageEditorCompileCommand.java index 4f61a099..4e3fc570 100644 --- a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/editor/LanguageEditorCompileCommand.java +++ b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/editor/LanguageEditorCompileCommand.java @@ -253,7 +253,7 @@ final class LanguageEditorCompileCommand { if (StringUtility.isEmpty(compilerExecutablePath)) { // ERROR: Path to {0} '{1}' executable is not set in the '{2}' preferences. createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E100, - compilerDefinition.getTextLower(), compilerDefinition.getName(), compilerPreferencesText); + compilerDefinition.getText(), compilerDefinition.getName(), compilerPreferencesText); return false; } File compilerExecutableFile = new File(compilerExecutablePath); @@ -261,7 +261,7 @@ final class LanguageEditorCompileCommand { // ERROR: Path to {0} '{1}' executable in the '{2}' preferences points to // non-existing file '{3}'. createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E103, - compilerDefinition.getTextLower(), compilerDefinition.getName(), compilerPreferencesText, + compilerDefinition.getText(), compilerDefinition.getName(), compilerPreferencesText, compilerExecutablePath); return false; } @@ -283,7 +283,7 @@ final class LanguageEditorCompileCommand { if (compilerParameterArray.length == 0) { // ERROR: The {0} '{1}' does not specify default parameters. createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E101, - compilerDefinition.getTextLower(), compilerDefinition.getName()); + compilerDefinition.getText(), compilerDefinition.getName()); return false; } @@ -324,7 +324,7 @@ final class LanguageEditorCompileCommand { // ERROR: Cannot execute {0} process '{1}' in working directory '{2}'. System // error: {3} createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E105, - compilerDefinition.getTextLower(), compilerProcess.getCommandArrayString(), + compilerDefinition.getText(), compilerProcess.getCommandArrayString(), compilerProcess.getWorkingDirectory().getPath(), ex.getMessage()); } @@ -404,7 +404,7 @@ final class LanguageEditorCompileCommand { // ERROR: {0} process ended with return code {1}. Check the error messages and // the console log. createMainSourceFileMessage(files, IMarker.SEVERITY_ERROR, Texts.MESSAGE_E127, - compilerDefinition.getTextLower(), + compilerDefinition.getText(), NumberUtility.getLongValueDecimalString(compilerProcess.getExitValue())); } diff --git a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/editor/LanguageEditorFilesLogic.java b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/editor/LanguageEditorFilesLogic.java index 8367016e..edbfc251 100644 --- a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/editor/LanguageEditorFilesLogic.java +++ b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/editor/LanguageEditorFilesLogic.java @@ -303,7 +303,7 @@ public final class LanguageEditorFilesLogic { // ERROR: Output file extension must be set in the preferences of {0} '{1}' or // via the annotation '{2}'. createMainSourceFileMessage(files, files.outputFileExtensionProperty, IMarker.SEVERITY_ERROR, - Texts.MESSAGE_E104, compilerDefinition.getTextLower(), compilerDefinition.getName(), + Texts.MESSAGE_E104, compilerDefinition.getText(), compilerDefinition.getName(), LanguageProperties.OUTPUT_FILE_EXTENSION); return false; diff --git a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/preferences/LanguagePreferencesCompilersPage.java b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/preferences/LanguagePreferencesCompilersPage.java index de02d78c..f1b65cde 100644 --- a/com.wudsn.ide.lng/src/com/wudsn/ide/lng/preferences/LanguagePreferencesCompilersPage.java +++ b/com.wudsn.ide.lng/src/com/wudsn/ide/lng/preferences/LanguagePreferencesCompilersPage.java @@ -441,7 +441,7 @@ public abstract class LanguagePreferencesCompilersPage extends FieldEditorPrefer // ERROR: Path to {0} '{1}' executable is not set in the '{2}' preferences. String compilerPreferencesText = LanguageUtility.getCompilerPreferencesText(compilerDefinition.getLanguage()); - label.setText(TextUtility.format(Texts.MESSAGE_E100, compilerDefinition.getTextLower(), compilerDefinition.getName(), + label.setText(TextUtility.format(Texts.MESSAGE_E100, compilerDefinition.getText(), compilerDefinition.getName(), compilerPreferencesText)); Tab tab = new Tab(compilerDefinition, tabs.size(), tabItem, tabContent, disabledControl, controlDecorations); tabs.put(compilerId, tab);