Re: [jenkinsci-docs] Re: source code translation to Brazilian Portuguese

25 views
Skip to first unread message

Tim Jacomb

unread,
Feb 20, 2022, 3:21:57 PM2/20/22
to Jenkins Developers, jenkins...@googlegroups.com
Added dev mailing list to cc

On Sun, 20 Feb 2022 at 17:58, Alceu Rodrigues de Freitas Junior <alceu.fr...@gmail.com> wrote:
Greetings,

I've made some more research about translating the Jenkins source code
and the current tooling available for that.

The script translation-tool.pl considers converting UTF-8 files to
ASCII, but does do that in a proper way (in Perl code).

I think that this is because due the history of Java support to Unicode.
The deprecated Brazilian Portuguese instructions mentions the online
tool http://itpro.cz/juniconv/ to convert UTF-8 to Java entities. That's
not very practical.

Researching about a CLI tool, I found mentions to
https://docs.oracle.com/javase/7/docs/technotes/tools/solaris/native2ascii.html,
but it seems it's usage was deprecated in newer versions of Java (and
OpenJDK).

I also found this link https://bugs.openjdk.java.net/browse/JDK-8074431
explaining the subject.

I was originally using Vim to edit the property files, but I considered
a shot with my old IntelliJ IDE, following the instructions at
https://www.jetbrains.com/help/idea/encoding.html#file-encoding-settings
and configured locally the jenkins-core code to be treated as ISO-8859-1
encoding. That took care of automatically converting the UTF-8
characters of Brazilian Portuguese to the appropriate Java entities.

It seems to me that this process generates the expected results, but
please let me know if it isn't. If it is acceptable, I would suggest to
add this information to the translation process documentation.

On the other hand, it seems to be that Jenkins should be able to support
reading those properties files in UTF-8 by default nowadays. Is that a
known issue?

Regards,

Alceu

--
You received this message because you are subscribed to the Google Groups "Jenkins Documentation" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-doc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-docs/2bf9c31d-78c9-a74b-2dff-a8774ba2e1fd%40gmail.com.

Jesse Glick

unread,
Feb 21, 2022, 9:28:16 AM2/21/22
to jenkin...@googlegroups.com
Alceu Rodrigues de Freitas Junior <alceu.fr...@gmail.com> wrote:
I was originally using Vim to edit the property files, but I considered
a shot with my old IntelliJ IDE

Or NetBeans will automatically open `*.properties` in ISO-8859-1 encoding. (And use `\uXXXX` escapes as needed, though I suppose that should not be needed for Portuguese.)

it seems to be that Jenkins should be able to support
reading those properties files in UTF-8 by default nowadays.

There was an abandoned effort to switch to UTF-8 XML files. YAML (by definition UTF-8, assuming there is no BOM) would be a plausible choice as well.
Reply all
Reply to author
Forward
0 new messages