svn commit: r17720 - trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels: meta ui
Christian López Espínola <[email protected]>
| Newsgroups | gmane.comp.lang.uml.argouml.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: penyaskito
Date: 2010-01-02 07:05:30-0800
New Revision: 17720
Modified:
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/PropertyMeta.java
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java
Log:
Added i18n to labelling.
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/PropertyMeta.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/PropertyMeta.java?view=diff&pathrev=17720&r1=17719&r2=17720
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/PropertyMeta.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/PropertyMeta.java 2010-01-02 07:05:30-0800
@@ -65,8 +65,12 @@
if (label != null)
this.label = label;
- else
- this.label = name;
+ else if (name != null)
+ // TODO: Getting the labels is more complex than this.
+ // Options:
+ // 1) Make the logic here (plurals, camel-to-hyphens...)
+ // 2) Change the labels in i18n files for every language.
+ this.label = "label." + name.toLowerCase();
}
public String getControlType() {
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml?view=diff&pathrev=17720&r1=17719&r2=17720
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/meta/panels.xml 2010-01-02 07:05:30-0800
@@ -207,8 +207,8 @@
<!--
<list name="feature" type="Feature" />
-->
- <list name="feature" type="Attribute" label="Attributes" />
- <list name="feature" type="Operation" label="Operations" />
+ <list name="feature" type="Attribute" label="label.attributes" />
+ <list name="feature" type="Operation" label="label.operations" />
<list name="association" type="Classifier" />
<list name="ownedElement" type="ModelElement" />
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java?view=diff&pathrev=17720&r1=17719&r2=17720
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java 2010-01-02 07:05:30-0800
@@ -173,7 +173,7 @@
addControl(panel, null, control);
} else {
// if not, it is a control and must be labeled...
- addControl(panel, prop.getLabel(), control);
+ addControl(panel, Translator.localize(prop.getLabel()), control);
}
} else {
final GetterSetterManager getterSetter = GetterSetterManager.getGetterSetter();
@@ -200,7 +200,7 @@
factory.createComponent(target, prop.getName(), prop.getType());
if (pane != null) {
- addControl(panel, prop.getLabel(), pane);
+ addControl(panel, Translator.localize(prop.getLabel()), pane);
}
}
@@ -213,7 +213,7 @@
factory.createComponent(target, prop.getName(), prop.getType());
if (list != null) {
- addControl(panel, prop.getLabel(), list);
+ addControl(panel, Translator.localize(prop.getLabel()), list);
}
}
@@ -444,7 +444,7 @@
}
if (comp != null) {
- addControl(panel, prop.getLabel(), comp);
+ addControl(panel, Translator.localize(prop.getLabel()), comp);
}
}
@@ -473,7 +473,7 @@
if (document != null) {
JTextField tfield = new UMLTextField(document);
- addControl(panel, prop.getLabel(), tfield);
+ addControl(panel, Translator.localize(prop.getLabel()), tfield);
}
}
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2434213
To unsubscribe from this discussion, e-mail: [[email protected]].