|
From: Kazutoshi S. <k_s...@f2...> - 2010-03-29 20:49:41
|
Marcelo Vanzin wrote:
> What's the real problem with the hack, aside from being a hack? It's a
> few lines of code that makes the lives of others much easier. And it
> can probably completely go away when we drop support for Java 5.
I was afraid of hard-coding the encoding of external file, as a
general problem. But I found you documented that class
LocalizationCatalog supports only UTF-8. And since the new .props are
new files (there is no need to support old .prop files saved in
ISO-8859-1), there seems no problem now.
It will be more robust if you check the following conversion don't
bring \uFFFD.
+ val = new String(sval.getBytes("ISO-8859-1"),
+ "UTF-8");
>> Do you know more often case where someone have to look into the
>> escaped file? Who was suffered from the problem?
>
> Try to review a diff that only has escaped unicode characters.
> Because, you know, nobody ever mistypes anything.
I think translators don't have to do such things for escaped files. All
edits can be done for separate file saved with their favorite encoding,
and convert it using native2ascii at the final step before distributing
it.
For example, Japanese translation is shipped with ..._sjis.properties
which is the editing form.
>> Then the problem can be solved only in plugins if .props can be
>> separated into PLUGIN.props and PLUGIN_gui.props, as same as jEdit core.
(snip)
> And you can't have more than a single translation installed on a
> system, but hey, nobody has shared installations of jEdit on
> multi-user systems, right?
>
> You also can't have the translations shipped with the code and have
> them be usable without user intervention.
Aren't these possible by separating a Map for *_gui.props, and loading
*_gui.ja_JP.props (or other localizations) into it?
I think it's better to keep the ability to localize GUI by overriding
.props, to allow translation by people who don't have development
environment, to allow separate release cycle for translation. Japanese
translations have been helped with these abilities.
--
k_satoda
|