i18n for sh colors

GitOrigin-RevId: 05aafec61e67f196cf8383facd3c430edcf02ce2
This commit is contained in:
Sergey Ignatov
2020-01-13 17:36:35 +00:00
committed by intellij-monorepo-bot
parent c8bfb5782f
commit d4fdfad747
2 changed files with 45 additions and 22 deletions
@@ -48,4 +48,26 @@ action.ShGenerateWhileLoop.description=Creates while loop
action.ShGenerateForLoop.text=For Loop
action.ShGenerateForLoop.description=Creates for loop
action.runShellFileAction.text=Run File
action.runShellFileAction.description=Run current shell file in the terminal
action.runShellFileAction.description=Run current shell file in the terminal
sh.color.function.declaration=Function Declaration
sh.color.conditional.operators=Conditional operators
sh.color.commands.subshell.command=Commands//Subshell Command
sh.color.commands.generic.command=Commands//Generic Command
sh.color.redirection=Redirection
sh.color.backquotes=Backquotes
sh.color.braces.square.brackets=Braces//Square Brackets
sh.color.braces.curly.brackets=Braces//Curly Brackets
sh.color.braces.parentheses=Braces//Parentheses
sh.color.here.documents.end=Here Documents End
sh.color.here.documents.start=Here Documents Start
sh.color.here.documents=Here Documents
sh.color.shebang.comment=Shebang Comment
sh.color.line.comment=Line Comment
sh.color.raw.string=Raw String
sh.color.string=String
sh.color.variables.composed.variable=Variables//Composed Variable
sh.color.variables.variable.declaration=Variables//Variable Declaration
sh.color.variables.variable.usage=Variables//Variable Usage
sh.color.keyword=Keyword
sh.color.number=Number
@@ -7,6 +7,7 @@ import com.intellij.openapi.fileTypes.SyntaxHighlighterFactory;
import com.intellij.openapi.options.colors.AttributesDescriptor;
import com.intellij.openapi.options.colors.ColorDescriptor;
import com.intellij.openapi.options.colors.ColorSettingsPage;
import com.intellij.sh.ShBundle;
import com.intellij.sh.ShFileType;
import com.intellij.sh.ShLanguage;
import org.jetbrains.annotations.NonNls;
@@ -19,31 +20,31 @@ import java.util.Map;
public class ShColorPage implements ColorSettingsPage {
private static final AttributesDescriptor[] ATTRS = {
new AttributesDescriptor("Number", ShHighlighterColors.NUMBER),
new AttributesDescriptor("Keyword", ShHighlighterColors.KEYWORD),
new AttributesDescriptor("Variables//Variable Usage", ShHighlighterColors.VARIABLE),
new AttributesDescriptor("Variables//Variable Declaration", ShHighlighterColors.VARIABLE_DECLARATION),
new AttributesDescriptor("Variables//Composed Variable", ShHighlighterColors.COMPOSED_VARIABLE),
new AttributesDescriptor("String", ShHighlighterColors.STRING),
new AttributesDescriptor("Raw String", ShHighlighterColors.RAW_STRING),
new AttributesDescriptor("Line Comment", ShHighlighterColors.LINE_COMMENT),
new AttributesDescriptor("Shebang Comment", ShHighlighterColors.SHEBANG_COMMENT),
new AttributesDescriptor(ShBundle.message("sh.color.number"), ShHighlighterColors.NUMBER),
new AttributesDescriptor(ShBundle.message("sh.color.keyword"), ShHighlighterColors.KEYWORD),
new AttributesDescriptor(ShBundle.message("sh.color.variables.variable.usage"), ShHighlighterColors.VARIABLE),
new AttributesDescriptor(ShBundle.message("sh.color.variables.variable.declaration"), ShHighlighterColors.VARIABLE_DECLARATION),
new AttributesDescriptor(ShBundle.message("sh.color.variables.composed.variable"), ShHighlighterColors.COMPOSED_VARIABLE),
new AttributesDescriptor(ShBundle.message("sh.color.string"), ShHighlighterColors.STRING),
new AttributesDescriptor(ShBundle.message("sh.color.raw.string"), ShHighlighterColors.RAW_STRING),
new AttributesDescriptor(ShBundle.message("sh.color.line.comment"), ShHighlighterColors.LINE_COMMENT),
new AttributesDescriptor(ShBundle.message("sh.color.shebang.comment"), ShHighlighterColors.SHEBANG_COMMENT),
new AttributesDescriptor("Here Documents", ShHighlighterColors.HERE_DOC),
new AttributesDescriptor("Here Documents Start", ShHighlighterColors.HERE_DOC_START),
new AttributesDescriptor("Here Documents End", ShHighlighterColors.HERE_DOC_END),
new AttributesDescriptor(ShBundle.message("sh.color.here.documents"), ShHighlighterColors.HERE_DOC),
new AttributesDescriptor(ShBundle.message("sh.color.here.documents.start"), ShHighlighterColors.HERE_DOC_START),
new AttributesDescriptor(ShBundle.message("sh.color.here.documents.end"), ShHighlighterColors.HERE_DOC_END),
new AttributesDescriptor("Braces//Parentheses", ShHighlighterColors.PAREN),
new AttributesDescriptor("Braces//Curly Brackets", ShHighlighterColors.BRACE),
new AttributesDescriptor("Braces//Square Brackets", ShHighlighterColors.BRACKET),
new AttributesDescriptor(ShBundle.message("sh.color.braces.parentheses"), ShHighlighterColors.PAREN),
new AttributesDescriptor(ShBundle.message("sh.color.braces.curly.brackets"), ShHighlighterColors.BRACE),
new AttributesDescriptor(ShBundle.message("sh.color.braces.square.brackets"), ShHighlighterColors.BRACKET),
new AttributesDescriptor("Backquotes", ShHighlighterColors.BACKQUOTE),
new AttributesDescriptor("Redirection", ShHighlighterColors.REDIRECTION),
new AttributesDescriptor("Commands//Generic Command", ShHighlighterColors.GENERIC_COMMAND),
new AttributesDescriptor("Commands//Subshell Command", ShHighlighterColors.SUBSHELL_COMMAND),
new AttributesDescriptor("Conditional operators", ShHighlighterColors.CONDITIONAL_OPERATORS),
new AttributesDescriptor(ShBundle.message("sh.color.backquotes"), ShHighlighterColors.BACKQUOTE),
new AttributesDescriptor(ShBundle.message("sh.color.redirection"), ShHighlighterColors.REDIRECTION),
new AttributesDescriptor(ShBundle.message("sh.color.commands.generic.command"), ShHighlighterColors.GENERIC_COMMAND),
new AttributesDescriptor(ShBundle.message("sh.color.commands.subshell.command"), ShHighlighterColors.SUBSHELL_COMMAND),
new AttributesDescriptor(ShBundle.message("sh.color.conditional.operators"), ShHighlighterColors.CONDITIONAL_OPERATORS),
new AttributesDescriptor("Function Declaration", ShHighlighterColors.FUNCTION_DECLARATION)
new AttributesDescriptor(ShBundle.message("sh.color.function.declaration"), ShHighlighterColors.FUNCTION_DECLARATION)
};
@NonNls private static final HashMap<String, TextAttributesKey> TAG_DESCRIPTOR_MAP = new HashMap<>();