PY-18792 Move messages into PyBundle

This commit is contained in:
Mikhail Golubev
2016-06-15 19:34:12 +03:00
parent 00bb34d627
commit 2034207ca7
4 changed files with 16 additions and 13 deletions
@@ -971,6 +971,12 @@ windowWithActions.closeWindow=Close window
# "Stop" button title
windowWithActions.stopProcess=Stop currently running process
formatter.imports.panel.title=Imports
formatter.imports.panel.optimize.imports=Optimize Imports
formatter.imports.panel.sort.alphabetically=Sort import statements alphabetically
formatter.imports.panel.sort.names.in.from.imports=Sort names in "from ... import ..." imports
formatter.imports.panel.join.from.imports.with.same.source=Join "from ... import ..." from the same source
formatter.panel.dict.alignment.do.not.align=Do not align
formatter.panel.dict.alignment.align.on.colon=Align on colon
formatter.panel.dict.alignment.align.on.value=Align on value
@@ -22,14 +22,14 @@
<clientProperties>
<BorderFactoryClass class="java.lang.String" value="com.intellij.ui.IdeBorderFactory$PlainSmallWithIndent"/>
</clientProperties>
<border type="none" title="Optimize Imports"/>
<border type="none" title-resource-bundle="com/jetbrains/python/PyBundle" title-key="formatter.imports.panel.optimize.imports"/>
<children>
<component id="e4d2f" class="com.intellij.ui.components.JBCheckBox" binding="mySortImportsAlphabetically" default-binding="true">
<constraints>
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Sort import statements alphabetically"/>
<text resource-bundle="com/jetbrains/python/PyBundle" key="formatter.imports.panel.sort.alphabetically"/>
</properties>
</component>
<component id="fdf9d" class="com.intellij.ui.components.JBCheckBox" binding="mySortNamesInFromImports" default-binding="true">
@@ -37,7 +37,7 @@
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="2" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Sort names in &quot;from ... import ...&quot; imports"/>
<text resource-bundle="com/jetbrains/python/PyBundle" key="formatter.imports.panel.sort.names.in.from.imports"/>
</properties>
</component>
<component id="a7a3a" class="com.intellij.ui.components.JBCheckBox" binding="myJoinFromImportsWithSameSource" default-binding="true">
@@ -45,7 +45,7 @@
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Join &quot;from ... import ...&quot; from the same source"/>
<text resource-bundle="com/jetbrains/python/PyBundle" key="formatter.imports.panel.join.from.imports.with.same.source"/>
</properties>
</component>
</children>
@@ -22,6 +22,7 @@ import com.intellij.openapi.fileTypes.FileType;
import com.intellij.openapi.options.ConfigurationException;
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.ui.components.JBCheckBox;
import com.jetbrains.python.PyBundle;
import com.jetbrains.python.PythonFileType;
import com.jetbrains.python.PythonLanguage;
import org.jetbrains.annotations.NotNull;
@@ -47,7 +48,7 @@ public class PyImportsCodeStylePanel extends CodeStyleAbstractPanel {
@Override
protected String getTabTitle() {
return "Imports";
return PyBundle.message("formatter.imports.panel.title");
}
@NotNull
@@ -1,11 +1,7 @@
from .module import b
from ..module import a
from ..module import c
from .module import d
from . import module1
from . import module2
from .. import pkg1
from .. import pkg2
from . import module1, module2
from .module import b, d
from .. import pkg1, pkg2
from ..module import a, c
print(a, b, c, d, module1, module2, pkg1, pkg2)