Skip to content

Commit

Permalink
Translate labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Guo Yunhe committed Aug 31, 2016
1 parent ef2bd2b commit 7a4a005
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 21 deletions.
2 changes: 1 addition & 1 deletion nbproject/project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ run.classpath=\
# Space-separated list of JVM arguments used when running the project.
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
run.jvmargs=
run.jvmargs=-Duser.language=en
run.test.classpath=\
${javac.test.classpath}:\
${build.test.classes.dir}
Expand Down
14 changes: 9 additions & 5 deletions src/me/guoyunhe/fontweak/MainWindow.form
Original file line number Diff line number Diff line change
Expand Up @@ -636,9 +636,11 @@
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="jLabel2">
<Component class="javax.swing.JLabel" name="matchListLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Match rules"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="me/guoyunhe/fontweak/lang/main.properties" key="MATCH LIST" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
<EmptyBorder bottom="5" left="5" right="5" top="5"/>
Expand All @@ -664,7 +666,7 @@

<Layout class="org.netbeans.modules.form.compat2.layouts.DesignBorderLayout"/>
<SubComponents>
<Container class="javax.swing.JScrollPane" name="jScrollPane2">
<Container class="javax.swing.JScrollPane" name="fontListScrollPane">
<Properties>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
Expand Down Expand Up @@ -766,9 +768,11 @@
</Component>
</SubComponents>
</Container>
<Component class="javax.swing.JLabel" name="jLabel3">
<Component class="javax.swing.JLabel" name="fontListLabel">
<Properties>
<Property name="text" type="java.lang.String" value="Fonts"/>
<Property name="text" type="java.lang.String" editor="org.netbeans.modules.i18n.form.FormI18nStringEditor">
<ResourceString bundle="me/guoyunhe/fontweak/lang/main.properties" key="FONT LIST" replaceFormat="java.util.ResourceBundle.getBundle(&quot;{bundleNameSlashes}&quot;).getString(&quot;{key}&quot;)"/>
</Property>
<Property name="border" type="javax.swing.border.Border" editor="org.netbeans.modules.form.editors2.BorderEditor">
<Border info="org.netbeans.modules.form.compat2.border.EmptyBorderInfo">
<EmptyBorder bottom="5" left="5" right="5" top="5"/>
Expand Down
30 changes: 15 additions & 15 deletions src/me/guoyunhe/fontweak/MainWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -166,16 +166,16 @@ private void initComponents() {
matchListButtonPanel = new javax.swing.JPanel();
matchCreateButton = new javax.swing.JButton();
matchDeleteButton = new javax.swing.JButton();
jLabel2 = new javax.swing.JLabel();
matchListLabel = new javax.swing.JLabel();
matchFontListPanel = new javax.swing.JPanel();
jScrollPane2 = new javax.swing.JScrollPane();
fontListScrollPane = new javax.swing.JScrollPane();
fontList = new javax.swing.JList<String>();
jPanel4 = new javax.swing.JPanel();
fontUpButton = new javax.swing.JButton();
fontDownButton = new javax.swing.JButton();
fontAddButton = new javax.swing.JButton();
fontRemoveButton = new javax.swing.JButton();
jLabel3 = new javax.swing.JLabel();
fontListLabel = new javax.swing.JLabel();
aliasPanel = new javax.swing.JPanel();
aliasScrollPane = new javax.swing.JScrollPane();
aliasTable = new javax.swing.JTable(){
Expand Down Expand Up @@ -329,21 +329,21 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

matchListPanel.add(matchListButtonPanel, java.awt.BorderLayout.PAGE_END);

jLabel2.setText("Match rules");
jLabel2.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
matchListPanel.add(jLabel2, java.awt.BorderLayout.PAGE_START);
matchListLabel.setText(bundle.getString("MATCH LIST")); // NOI18N
matchListLabel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
matchListPanel.add(matchListLabel, java.awt.BorderLayout.PAGE_START);

matchPanel.add(matchListPanel);

matchFontListPanel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 0, 5, 0));
matchFontListPanel.setLayout(new java.awt.BorderLayout());

jScrollPane2.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 5));
fontListScrollPane.setBorder(javax.swing.BorderFactory.createEmptyBorder(0, 5, 0, 5));

fontList.setModel(fontListModel);
jScrollPane2.setViewportView(fontList);
fontListScrollPane.setViewportView(fontList);

matchFontListPanel.add(jScrollPane2, java.awt.BorderLayout.CENTER);
matchFontListPanel.add(fontListScrollPane, java.awt.BorderLayout.CENTER);

jPanel4.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 0, 5, 0));
jPanel4.setLayout(new java.awt.FlowLayout(java.awt.FlowLayout.LEFT, 5, 0));
Expand Down Expand Up @@ -386,9 +386,9 @@ public void actionPerformed(java.awt.event.ActionEvent evt) {

matchFontListPanel.add(jPanel4, java.awt.BorderLayout.PAGE_END);

jLabel3.setText("Fonts");
jLabel3.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
matchFontListPanel.add(jLabel3, java.awt.BorderLayout.PAGE_START);
fontListLabel.setText(bundle.getString("FONT LIST")); // NOI18N
fontListLabel.setBorder(javax.swing.BorderFactory.createEmptyBorder(5, 5, 5, 5));
matchFontListPanel.add(fontListLabel, java.awt.BorderLayout.PAGE_START);

matchPanel.add(matchFontListPanel);

Expand Down Expand Up @@ -766,22 +766,22 @@ public void run() {
private javax.swing.JButton fontAddButton;
private javax.swing.JButton fontDownButton;
private javax.swing.JList<String> fontList;
private javax.swing.JLabel fontListLabel;
private javax.swing.JScrollPane fontListScrollPane;
private javax.swing.JButton fontRemoveButton;
private javax.swing.JButton fontUpButton;
private javax.swing.JButton helpButton;
private javax.swing.JCheckBox hintingCheckBox;
private javax.swing.JLabel hintingLabel;
private javax.swing.JComboBox<String> hintstyleComboBox;
private javax.swing.JLabel hintstyleLabel;
private javax.swing.JLabel jLabel2;
private javax.swing.JLabel jLabel3;
private javax.swing.JPanel jPanel4;
private javax.swing.JScrollPane jScrollPane2;
private javax.swing.JButton matchCreateButton;
private javax.swing.JButton matchDeleteButton;
private javax.swing.JPanel matchFontListPanel;
private javax.swing.JList<String> matchList;
private javax.swing.JPanel matchListButtonPanel;
private javax.swing.JLabel matchListLabel;
private javax.swing.JPanel matchListPanel;
private javax.swing.JScrollPane matchListScrollPane;
private javax.swing.JPanel matchPanel;
Expand Down
2 changes: 2 additions & 0 deletions src/me/guoyunhe/fontweak/lang/main.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ LANGUAGE=Language
ABOUT\ HTML=<html><body>\n<h1>Fontweak</h1>\n<p><em>A Simple Fontconfig Frontend</em></p>\n<dl>\n<dt>Version</dt>\n<dd>1.0.0</dd>\n<dt>License</dt>\n<dd>GNU General Public License version 3</dd>\n<dt>Author</dt>\n<dd>Guo Yunhe [email protected]</dd>\n<dt>Website</dt>\n<dd>https://github.com/guoyunhe/fontweak</dd>\n</dl>\n</body></html>
CREATE\ FONT\ MATCH=Create font match
CHOOSE\ FONT=Choose font
MATCH\ LIST=Match rule list
FONT\ LIST=Font list
2 changes: 2 additions & 0 deletions src/me/guoyunhe/fontweak/lang/main_zh_CN.properties
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ LANGUAGE=\u8bed\u8a00
ABOUT\ HTML=<html><body>\n<h1>Fontweak</h1>\n<p><em>\u7b80\u6613\u7684 Fontconfig \u524d\u7aef</em></p>\n<dl>\n<dt>\u7248\u672c</dt>\n<dd>1.0.0</dd>\n<dt>\u8bb8\u53ef</dt>\n<dd>GNU General Public License version 3</dd>\n<dt>\u4f5c\u8005</dt>\n<dd>\u90ed\u4e91\u9e64 [email protected]</dd>\n<dt>\u7f51\u7ad9</dt>\n<dd>https://github.com/guoyunhe/fontweak</dd>\n</dl>\n</body></html>
CREATE\ FONT\ MATCH=\u521b\u5efa\u5b57\u4f53\u5339\u914d
CHOOSE\ FONT=\u9009\u62e9\u5b57\u4f53
FONT\ LIST=\u5b57\u4f53\u5217\u8868
MATCH\ LIST=\u5339\u914d\u89c4\u5219\u5217\u8868

0 comments on commit 7a4a005

Please sign in to comment.