archi icon indicating copy to clipboard operation
archi copied to clipboard

Language Pack Translation Issues

Open rojoweko opened this issue 5 years ago • 70 comments

Version of Archi

4.7.1

Operating System

Windows 10

Expected Behaviour

The complete GUI shoud be translatable

Actual Behaviour

For some parts of the GUI no translation can be added

Steps to Reproduce the Behaviour

  1. Create and import an Archi language package plugin template, translate the GUI, export the language plugins and combine them with the respective babel-plugins according to https://github.com/archimatetool/archi/wiki/Translating-Archi
  2. Install the language plugins into the application directory of your Archi installation
  3. Launch Archi and check the menus of the GUI

At least the following parts of the GUI appear still in English:

  • Menu entry "Edit -> Rename", when an element in the View windows is selected.
  • Menu actions under "View -> Position" ("Align left", etc.) and the tooltips of the respective buttons.
  • Label of the Outline window.
  • Some menu actions under "File -> Import" ("Model From Open Exchange File..." and "Another Model Into Selected Model..." as well as the Import Model dialogue window).
  • Menu action "Model To Open Exchange File..." as well as the Export Model dialogue window.
  • Menu entry "Tools -> Properties Manager".
  • Dropdown menu entries "PDF Image" and "SVG Image" in the Image Export dialogue box.

Searching with Eclipse through the translation plugin templates did not bring up these properties.

According to the translation manual referenced above I used the most recent babel language plugin for Eclipse "Oxygen" (is this still correct?).

Thanks in advance for looking into this! ;-)

rojoweko avatar Oct 14 '20 23:10 rojoweko

Menu entry "Edit -> Rename", when an element in the View windows is selected.

That was internal. I've now externalised it.

Menu actions under "View -> Position" ("Align left", etc.) and the tooltips of the respective buttons.

These are internal Eclipse GEF messages. Hwoever, I'v found a way to externalise them.

Label of the Outline window.

This is internal to Eclipse. I don't know where the string is for that.

Some menu actions under "File -> Import" ("Model From Open Exchange File..." and "Another Model Into Selected Model..."

I've now externalised these ones.

as well as the Import Model dialogue window).

These are already externalised in com.archimatetool.modelimporter.messages.properties

Menu action "Model To Open Exchange File..."

I've now externalised this one.

as well as the Export Model dialogue window.

These are already externalised in org.opengroup.archimate.xmlexchange.wizard.messages.properties

Menu entry "Tools -> Properties Manager".

I've now externalised this one.

Dropdown menu entries "PDF Image" and "SVG Image" in the Image Export dialogue box.

I've now externalised these ones.

According to the translation manual referenced above I used the most recent babel language plugin for Eclipse "Oxygen" (is this still correct?).

Oxygen is very old. We are using Eclipse 4.15 now. I don't know if there is a newer one.

Phillipus avatar Oct 15 '20 10:10 Phillipus

For reference:

https://github.com/archimatetool/archi/compare/externalise-strings

Phillipus avatar Oct 15 '20 10:10 Phillipus

BTW - the wiki is probably out of date and incorrect by now. Anyone is free to update it if necessary. For my part, I can only externalise the strings where possible,

Phillipus avatar Oct 15 '20 10:10 Phillipus

Thanks for the quick response! I will update my local repo and try again! ;-)

Here's another one I forgot before (sorry):

  • Name of the "Label"-section in the Properties window.

rojoweko avatar Oct 15 '20 14:10 rojoweko

Regarding Babel: There are only language packages for "even" minor versions of Eclipse available (e.g. 4.12, 4.14, 4.16). I tried them up to 4.14, but did not notice any improvements regarding the coverage of translated GUI items. 4.14 even caused Archi to start much slower than usual.

rojoweko avatar Oct 15 '20 14:10 rojoweko

Name of the "Label"-section in the Properties window.

OK, I added that one and re-pushed the commit.

Phillipus avatar Oct 15 '20 15:10 Phillipus

Thanks a lot! ;-)

rojoweko avatar Oct 15 '20 15:10 rojoweko

Do I need to check out a different branch to test the changes? I tried to pull an update via "Team -> Pull" from the master but I did not find the changes in e.g. com.archimatetool.editor.

rojoweko avatar Oct 15 '20 15:10 rojoweko

It's in a different branch - externalise-strings. I'll keep them in a branch in case there are more changes.

Phillipus avatar Oct 15 '20 15:10 Phillipus

OK, that seemed to work! Thank you! ;-) The only non-translatable strings left I have noticed so far are the following:

  • Tooltips of the alignment/matching buttons in the toolbar ("Align left", etc., "Match Width...", etc.)
  • The names of ArchiMate viewpoints in the menu actions under "View -> Viewpoint"
  • Menu entries "Edit -> Undo" and "Edit -> Redo" and the respective tooltips for buttons in the toolbar
  • Menu entries "View -> Zoom In/Out"

Could these be externalised by you as well or are they part of the Exclipse framework?

Please also update the create-nls.xml Ant script in order to set up the localized plugins for the modelimporter and xmlexchange.

Is it possible to show the translated cheat sheets in the cheat sheet list instead of the English ones?

Is there a way of enabling the language pack on a non localized operating system?

Thanks in advance! ;-)

rojoweko avatar Oct 17 '20 17:10 rojoweko

The first set of changes from before have been merged into the master branch.

The following changes are now in the externalise-strings branch:

  • Tooltips of the alignment/matching buttons in the toolbar ("Align left", etc., "Match Width...", etc.)
  • Menu entries "View -> Zoom In/Out"
  • Updated the create-nls.xml Ant script

These are not updated:

The names of ArchiMate viewpoints in the menu actions under "View -> Viewpoint"

This is not externalisable in the usual way. The file is com.archimatetool.model\model\viewpoints.xml. You'd have to translate the name parts and distribute the new file.

Menu entries "Edit -> Undo" and "Edit -> Redo" and the respective tooltips for buttons in the toolbar

These are internal to Eclipse's GEF framework.

Is it possible to show the translated cheat sheets in the cheat sheet list instead of the English ones?

There are two xml files in com.archimatetool.help\cheatsheets - You should edit those in the nls target project.

Is there a way of enabling the language pack on a non localized operating system?

I don't know. I think you have to set the language somehow in the startup - see https://www.eclipse.org/articles/Article-Speak-The-Local-Language/article.html

Phillipus avatar Oct 17 '20 18:10 Phillipus

This is not externalisable in the usual way. The file is com.archimatetool.model\model\viewpoints.xml. You'd have to translate the name parts and distribute the new file.

Do you know if it is possible to add multiple name tags with different value for xml:lang attribute ? If yes this would mean it is possible to create a single viewpoints.xml file containing multiple translations.

jbsarrodie avatar Oct 17 '20 18:10 jbsarrodie

Do you know if it is possible to add multiple name tags with different value for xml:lang attribute ? If yes this would mean it is possible to create a single viewpoints.xml file containing multiple translations.

It's not possible right now. It's something I wrote and didn't figure out a way to read in an XML file and take that into account. It needs more work to do that...one day. ;-)

Phillipus avatar Oct 17 '20 19:10 Phillipus

@rojoweko I've figured out a way to support language packs for the viewpoints.xml file. I've changed the create-nls.xml Ant script to copy this file to the exported com.archimatetool.model project. All you need to do is edit the name in the target project's xml file. (Don't worry about the xml:lang="en" part, that is ignored.)

Basically the same process as editing a hints file in the help project.

Is there a way of enabling the language pack on a non localized operating system?

In the Archi.ini file add two lines after openFile line:

-nl
xx

(xx = "fr" or "ru" or "de" language code)

Phillipus avatar Oct 18 '20 10:10 Phillipus

Great! ;-) The tooltips and the menu entries seem to work (the tooltips only when the view window has the focus, but this is probably ok). I also tried the viewpoint.xml by modifying a copy of it in the localized plugin, but this does not seem to work yet. Since I do not really know Ant scripting I tried the following subdirectories in the localized plugin, but without success:

  • model
  • nl
  • nl/model
  • nl/de
  • nl/de/model

Did I get something wrong?

Thanks for the hint with the Archi.ini file! I will check that out! ;-)

rojoweko avatar Oct 18 '20 14:10 rojoweko

The new version of the Ant script will copy viewpoints.xml to the target project. You need to get the latest code from the externalise-strings branch.

Also, there is a change in the main Archi code itself to support this.

Phillipus avatar Oct 18 '20 14:10 Phillipus

There was an error in the Ant script for org.opengroup.archimate.xmlexchange. Fixed in latest commit to the externalise-strings branch.

Phillipus avatar Oct 18 '20 15:10 Phillipus

Looking good now! ;-)

Do you have any plans to offer the integration of third party language packages into the mainline distribution of Archi?

rojoweko avatar Oct 18 '20 17:10 rojoweko

Do you have any plans to offer the integration of third party language packages into the mainline distribution of Archi?

No. I can't be responsible for their distribution and upkeep. If they are maintained elsewhere they can be maintained by their owners and not dependent on Archi release cycles.

Phillipus avatar Oct 18 '20 17:10 Phillipus

Do you support a different way of distributing language packages?

rojoweko avatar Oct 18 '20 17:10 rojoweko

Do you support a different way of distributing language packages?

As with any Archi plug-in, it's the responsibility of the language pack owner to maintain and distribute them as downloads. We can advertise them on the Archi website - https://www.archimatetool.com/resources/

Phillipus avatar Oct 18 '20 17:10 Phillipus

OK - Thanks for the info! ;-)

rojoweko avatar Oct 18 '20 17:10 rojoweko

Shall we leave this open as a permanent issue for dealing with similar requests in the future?

rojoweko avatar Oct 19 '20 16:10 rojoweko

Otherwise I would close it and reopen it when necessary. ;-)

rojoweko avatar Oct 19 '20 16:10 rojoweko

Keep it open. I renamed it to suit the purpose better.

Phillipus avatar Oct 19 '20 16:10 Phillipus

OK, thanks.

Do you need any further information from me for now before merging the changes in the master branch?

rojoweko avatar Oct 19 '20 16:10 rojoweko

Do you need any further information from me for now before merging the changes in the master branch?

No, thanks. I'll keep the externalise-strings branch open for a bit longer just in case. Cheers.

Phillipus avatar Oct 19 '20 16:10 Phillipus

Hi, you were right to keep the branch open a little bit longer! ;-) I found the following other non-translatable components:

  • Tooltip of the Select Tool button ("Select")
  • Welcome screen
  • Context menu and settings dialogue of the palette
  • "Detach" in the context menu of the windows tabs

rojoweko avatar Oct 24 '20 15:10 rojoweko

  • Tooltip of the Select Tool button ("Select")
  • Context menu and settings dialogue of the palette

These are internal to GEF so must come from the GEF language pack

  • "Detach" in the context menu of the windows tabs

This is internal to Eclipse so must come from their language pack.

  • Welcome screen

I updated the create-nls.xml Ant script to copy across the Intro files to the com.archimatetool.editor nl sub-directory.

Phillipus avatar Oct 24 '20 16:10 Phillipus

OK. I tried the updated create-nls.xml Ant script, but somehow it did not quite do the trick yet. The Welcome screen still does not use the translated into.html (that I actually already placed manually in the same directory before trying the new script).

rojoweko avatar Oct 24 '20 17:10 rojoweko