Developers: translate the user interface

2010-08-06
2014-07-01
1 2 3 4 > >> (Page 1 of 4)
  • Davide Bucci
    Davide Bucci
    2010-08-06

    Dear all,
    translating the FidoCadJ user interface is quite easy.
    All is contained in some resource files which are dynamically loaded by
    FidoCadJ whenever a message is be shown. Those files are called
    MessagesBundle_aa_BB.properties and are contained in the trunk/bin directory
    of FidoCadJ sources. They are also packed in the bin directory of the
    fidocadj.jar archive. The letters aa stand for the user language code and BB
    for the country code corresponding to the locale of the translation. For
    example, the file MessagesBundle_en_US.properties contains the English version
    for the United States locale.
    If you want to translate FidoCadJ in your language, you may first determine
    your locale (the code for the language and the name of your country) and copy
    the file MessagesBundle_en_US.properties with the aa and BB fields
    corresponding to your locale. For example, the Italian version is called
    MessagesBundle_it_IT.properties. Then you may open the file with your favorite
    text editor (no formatting at all! Microsoft Word will not do) and you will
    find something like what follows:

    File = File
    New = New
    Open = Open file
    Save = Save
    SaveName = Save as...
    Export = Export
    Print = Print
    Close = Close
    
    Edit_menu = Edit
    Undo = Undo
    Redo = Redo
    Cut = Cut
    Copy = Copy
    Paste = Paste
    SelectAll = Select All
    Rotate = Rotate
    Mirror_E = Mirror
    
    ...
    

    Each line is composed by a key and the corresponding string which you may
    translate. Do not touch the key at the beginning of the line. Here is for
    comparison the translated Italian version:

    File = File
    New = Nuovo disegno
    Open = Apri un file
    Save = Salva
    SaveName = Salva con nome
    Export = Esporta
    Print = Stampa
    Close = Chiudi
    
    Edit_menu = Composizione
    Undo = Cancella
    Redo = Ripristina
    Cut = Taglia
    Copy = Copia
    Paste = Incolla
    SelectAll = Seleziona tutto
    Rotate = Ruota elemento
    Mirror_E = Specchia elemento
    
    ...
    

    Be careful that sometimes at the end of the messages there are some spaces
    useful for the correct formatting. You may put them also in the new version of
    the file.
    When you have finished the translation, you may copy the file with the correct
    name in the bin directory of FidoCadJ. If the application recognize that a
    language resource file corresponding to the operating system local is present,
    it just load it. If it is missing, the English version is loaded.

    If you prepare a translation of the FidoCadJ user interface in your language,
    please keep us informed. We will review it and include in the next version of
    FidoCadJ!

     
  • Androu1
    Androu1
    2010-10-29

    I've emailed my translation to spanish, please tell me if you receive it. Or
    if you don't, so I can send it again!

     
  • Davide Bucci
    Davide Bucci
    2010-10-29

    Hello Androu1,
    I have not received your translation. The email address which I use here on SF
    has an antispam facility which is quite agressive, so it may be that your
    message has been discarded. Can you please send a first message without joint
    files?

    Best regards,

    Darwin

     
  • Davide Bucci
    Davide Bucci
    2010-10-30

    Dear Androu1,
    I received your spanish translation. It seems to me very good. Many thanks!
    I will include it in the SVN and it will be used in the next version of
    FidoCadJ. I think it will be very useful for people wanting to use FidoCadJ in
    spanish!

    Best regards and thanks again,

    Davide

     
  • Davide Bucci
    Davide Bucci
    2010-10-30

    Hi,
    I included the files you sent in the last commit to the SVN code repository.

    Thanks again!!!

     
  • Davide Bucci
    Davide Bucci
    2010-10-30

    Dear Androu1,
    I worked a little on the code and I made two things:

    • I renamed all the message bundle files in order NOT to specify the country, but just the language. Now, if someone is using FidoCadJ in Venezuela or in Spain with a operating system in spanish, he will always be using the same message bundle file MessagesBundle_es.properties. This is useful, since variants for countries can be introducted only if necessary and avoid the replication of the same file for all countries speaking the same language. I had the same problem with Italian spoken in Swiss and so I replicated the files, but that is unnecessary and not very elegant. I did not read very carefully the Java documentation for that. If you feel useful to introduce variants used only in Venezuela, you may create a new MessagesBundle_es_VE.properties which will be used only there.

    • I changed the code of the About window in order to show the programDescription3 line. If you agree, this will be used for giving credits to the translator, so I added there something like "Traducción de Androu1" :-)

    Thanks again for your wonderful work. I think this is very useful for people
    using FidoCadJ all around the world. Adding Spanish is really a nice thing.

     
  • Androu1
    Androu1
    2010-12-13

    That sounds really awesome, darwinne.

    Contact me if you need anything else.

     
  • Davide Bucci
    Davide Bucci
    2010-12-13

    Dear Androu1,
    a few days ago, I put on SourceForge the firsts preliminary versions of
    FidoCadJ 0.23.5. They are unstable (in reality, 0.23.5 beta seems to be quite
    good), but may be used to see the result of your efforts, since they contain
    your very welcomed translation.

    Once again, many many thanks!

    Darwin

     
  • Androu1
    Androu1
    2010-12-13

    Awesome! I'll grab a download and check if everything's right as soon as I
    can. Hope I didn't make any mistakes, or at least not too many, haha.

     
  • Davide Bucci
    Davide Bucci
    2011-06-02

    Dear androu1, I need your help once more...

    I am now working to a new version of FidoCadJ and I added a few new items to
    the user interface. Can you please consider to translate them?
    BTW, do you know how to use svn?

    Best regards,

    D.

     
  • Simo
    Simo
    2012-03-21

    Hi darwinne, after our conversation here, I downloaded and started to edit
    this
    file.

    I just changed a few words and I translated the others You need.
    The problem is that I still don't know how to post it with SVN, and, on the
    other hand, I would like to try the translation file on my computer.
    I replaced the file as You suggested me, but it seems to be not working.
    I also tried to replace the content with the English translation file which is
    "MessageBundles_en.properties", but FidoCadJ can't run due to it does not find
    the English words in "MessageBundles_en.properties", as it seems.
    After all, I noticed that there is not an option for language selection. I use
    FidoCadJ in English language as default and I never worried about changing
    language until now.

    Can you help me, please? :)

    Best Regards,

    sbcne

     
  • Davide Bucci
    Davide Bucci
    2012-03-21

    Dear sbcne,
    first of all, welcome onboard :-)

    What I might suggest is to download a complete set of the FidoCadJ sources
    with SVN and work there. You might be able to compile and run FidoCadJ from
    your computer. You will need SVN working on your computer as well as a
    complete JDK.
    Here are the instructions on how to obtain all the FidoCadJ sources using SVN:

    https://sourceforge.net/scm/?type=svn&group_id=274886

    the command:

    svn co [url]https://fidocadj.svn.sourceforge.net/svnroot/fidocadj[/url] fidocadj
    

    allows you to obtain a copy of the last revision loaded on the SVN repository.
    This operation is called a "checkout" and let you obtain on your computer a
    very up-to-date version of the sources. In the FidoCadJ project, everyone can
    do a checkout, but you need to have a write access permission to the
    repository to "commit" your changes. I can give you a write access to the
    repository in order you can commit your file.
    The README file contains some useful instructions on how to compile and run
    the program on different platforms. You might read this file
    here, even if the version
    contained in the SVN repository is usually more recent.
    If you are using Windows as your operating system, you might find very useful
    the TortoiseSVN utility.

    Once you have the sources, you find the files containing the language
    resources in the fidocadj/trunk/bin directory.

    FidoCadJ t the startup search for the current locale and tries to find a
    language resource file corresponding to this locale. This means that if you
    are using English, it will try to use the resources contained in the
    MessagesBundle_en.properties file, as you might have imagined.

    If you want to see if the Spanish translation is working, you can change the
    current locale, which is quite easy on some operating systems, and a little
    bit more complicated on other ones. A second possibility is to modify the code
    to force FidoCadJ to use a specific locale. In revision 241 which is up-to
    date at the moment I am writing, you might uncomment line 155 of the
    FidoFrame.java source file, contained in the trunk/src directory and rebuild
    the project:

            // Uncomment to force FidoCadJ to use a specified locale
            // currentLocale = new Locale("de", "DE");
    

    Hope it helps.

    Best regards,

    D.

     
  • Davide Bucci
    Davide Bucci
    2012-04-01

    Dear sbcne,
    were you able to understand how to use Subversion? I know it is somewhat
    awkward in some situations...
    If you need some help, just ask!

    Best regards,

    D.

     
  • Simo
    Simo
    2012-04-03

    Hi darwinne, the tutorial seems to be very great, and after your suggestion I was
    able to do the checkout. :)

    Now, the file to be replaced, if it's not too late for me (it's half past five
    o'clock in the morning right now) and if I understood well, the file to be
    replaced is fidocadj/trunk/MessagesBundle_es.properties. Is it correct? If
    so, what remains to do is just to replace the content of that file and do the
    commit of the change.

    Am I on the right way? :)

     
  • Davide Bucci
    Davide Bucci
    2012-04-03

    Dear sbcne,
    if I recall correctly, the file is
    fidocadj/trunk/bin/MessageBundle_es.properties.
    You might give a try by rebuilding FidoCadJ (see the instructions on the
    README file).
    I just gave you write access to the FidoCadJ repository! Just remember that a
    commit might not break the build.

    Best regards,

    D.

     
  • Davide Bucci
    Davide Bucci
    2012-04-03

    I forgot a detail. I added a very basic SH script which test if the available
    message bundles are complete.
    It is called test_messages.sh and you can find in
    fidocadj/trunk/test/messages. This script might be improved a lot and one of
    its problems is that it currently gives some false alarms for the German
    translation (the guy who translated it had the idea of sorting the lines of
    the file and the test is a little puzzled).

    Cheers,

    D.

     
  • Davide Bucci
    Davide Bucci
    2012-04-05

    Dear sbcne,
    i saw your commit. Thumbs up, that is perfect!

    Best regards,

    D.

     
  • Simo
    Simo
    2012-04-07

    Thank You da darwinne, in the next days I will try the software with changes
    applied in order to confirm that they are made as the best I could do. I'll
    write You soon.

    Bye

    S.

     
  • Davide Bucci
    Davide Bucci
    2012-04-08

    Dear sbcne,
    I checked the file and it seems to be complete. However, the automatic test
    provided by /fidocadj/trunk/test/messages/iscomplete.sh gives a false alarm,
    exactly as it does for the German resource file.
    Probably, the test should be improved, since it seems to be somewhat sensible
    to the order of the keys as well as to the number of blank lines.
    By the way, I saw that the language resource file must still be in the ISO
    Latin 1 encoding. For the moment, the easiest solution is to convert the file,
    and I converted it, but it remains to be seen how to upgrade all the system to
    UTF-8, which will be much more flexible.
    Just a detail: some strings might finish with a space, depending how they are
    used in the software. For example, if you have a look at the
    fidocadj/bin/MessageBundle_it.resources file, you might see:

    Version = Versione
    

    And there is a space just before the newline. This string is used in the
    "About" dialog and if the space is not present, you will see something like
    "Version0.24", instead of "Version 0.24".
    I committed a new version, you should update your working copy (e.g. type "svn
    update" when you are in fidocadj/trunk).

    Very good job!

    Best regards,

    D.

     
  • Miles Qin
    Miles Qin
    2012-04-11

    Hello darwinne,

    the language resource file must be in the ISO Latin 1 encoding (with single
    byte encoding), but my mathor language is chinese (with multi bytes encoding),
    thus how should I do translation ?

    Best Regards,

    Miles

     
  • Davide Bucci
    Davide Bucci
    2012-04-11

    Dear Miles,
    welcome in the discussion. As I said to sbcne, I think it would be better to
    upgrade the language resource files to the UTF-8 encoding, since FidoCadJ
    already adopts this encoding elsewhere.
    Do you know how to use Subversion? If you want to translate the user interface
    (thanks, by the way!), you may try working on an UTF-8 encoded file. In the
    meanwhile, I will have a look at this problem on the programming side, unless
    someone is willing to contribute on that.

    Best regards,

    D.

     
  • Davide Bucci
    Davide Bucci
    2012-04-13

    Dear Miles,
    in the last commit, I made sort that every language resource file is now
    encoded in the UTF-8 format, without BOM.
    I already changed the encoding for the existing files. Now, everything is
    ready for your Chinese translation: I tested the file you sent by email and it
    worked (I just removed the BOM), but I prefer that every contribution now
    comes from Subversion commits. After all, translating the user interface is a
    very important part of the developing activity :-)

    Tell me when you are ready, I will give you write access on the source code
    repository.

    Thanks again and best regards,

    D.

     
  • Miles Qin
    Miles Qin
    2012-04-13

    hello darwinne,

    thinks for you reply. I'm learning to use the Subversion.

    I met some problems in the translation process, can you help me?

    There are some messages in file "MessagesBundle_en.properties" can't be found
    when I use FidoCadJ, are listed below :
    Time = Time elapsed
    macroSize = Vertical size:
    Small = Small
    Medium_1 = Medium 1
    Medium_2 = Medium 2
    Big = Big
    Very_big = Very big
    Profile = Activate profiler
    Format_invalid = I can not read one of the numbers typed.
    Elapsed = Elapsed time
    Averaged = ms, on average
    Runs = redraws.
    MsOn = ms in

    Could you tell me where can I find them? Conducive to the translation. thank
    you very much!

     
  • Davide Bucci
    Davide Bucci
    2012-04-13

    Hello Miles,
    I try to answer to your questions.
    Let's begin from those ones:

    Time = Time elapsed 
    Profile = Activate profiler
    Elapsed = Elapsed time 
    Averaged = ms, on average 
    Runs =  redraws.
    MsOn = ms in
    

    In the preliminary versions of FidoCadJ, there is a timer which measures the
    time needed for a complete redraw. It is very useful to understand if a change
    on the code has had an impact on the redraw speed and if you compare older
    versions of FidoCadJ to the current ones, you might notice that there has been
    an evident improvement from that point of view. "Activate profiler" is shown
    only in the preliminary versions (where Global.isBeta is set to true), in
    Preferences dialog:


    Format_invalid = I can not read one of the numbers typed.
    

    This is an error, which appears when you type something weird in a text field
    where you supposed to type a number (e.g. type "dsfkj" in the place of a
    coordinate in the parameter of some drawing element).

    macroSize = Vertical size:
    Small = Small
    Medium_1 = Medium 1
    Medium_2 = Medium 2
    Big = Big
    Very_big = Very big
    

    Uhm... those were used in the applet FidoReadJ, at the very beginning:

    http://davbucci.chez-alice.fr/index.php?argument=elettronica/fidoreadj/fidore
    adj.inc&language=English

    I do not think the applet (which now shares much of its code with FidoCadJ) is
    needing those resources anymore, but I should check it more into detail.

    Best regards,

    D.

     
  • Davide Bucci
    Davide Bucci
    2012-04-13

    Dear qhg007,
    you have now write access to the FidoCadJ source code repository. You can
    commit your file MessagesBundle_zh.properties. Probably, after you have svn
    working on your computer, you might proceed as follows:
    1. Do a checkout, as described there: https://sourceforge.net/scm/?type=svn&group_id=274886
    2. Copy your file MessagesBundle_zh.properties in the trunk/bin directory of your working copy
    3. Go to trunk/bin and perform a "svn add" to your file MessagesBundle_zh.properties
    4. Check that everything works (refer to the README file to see how to compile in your operating system)
    5. If everything is OK, do a svn commit.

    Just be sure that the encoding is UTF-8 without BOM, if the BOM is present,
    FidoCadJ will not start correctly.

    Thanks again and best regards,

    D.

     
1 2 3 4 > >> (Page 1 of 4)


Anonymous


Cancel   Add attachments