Synonym class is not working

Post Reply
v93ry
Posts: 12
Joined: 27 Jul 2015, 19:48

I am trying to use a simple synonym class and it seems it is not working. The Chrome portion is working fine but seems there is a but for synonyms. Could you give more information how to use it?
User avatar
neil.walsh
Posts: 444
Joined: 16 Feb 2009, 13:45
Contact:

Hi,

Can you provide a bit more information about the bug you were experiencing?
The Synonym class is used to manage synonyms for any element in the model. Synonyms can be classified by Taxonomies, e.g. Languages, Organisation Units, Domains and so on. Synonyms are managed from the element to which they apply and so, an explicit bi-directional relationship is not defined.
The Name field, defines the name of the synonym and in this context, the Description field is certainly optional.
We most commonly use synonyms for managing translations but they can also be used for a "AKA" (also known as) type relationship.

It should be said that there is very little support for Synonyms in the Viewer outside of their use for translations.

What are you trying to achieve with their use?

Cheers

Neil
v93ry
Posts: 12
Joined: 27 Jul 2015, 19:48

Thanks for the prompted reply! Acctually I am trying to use Synonym class for translation purposes. I am from Brasil and I am translating Enterprise Project for Brazilian Portuguese. The static portion is working fine but when I try to use the synonym class in the repository it is not working. For example i try to create some synonyms for the classes for reports like Core: Application Analysis Impact and it is not working when i try to publish.
User avatar
neil.walsh
Posts: 444
Joined: 16 Feb 2009, 13:45
Contact:

Hi,

Some quick thoughts you can verify

Have you created a instance of a "Language" class and associated that with the Synonym?

Have you created an instance of a "Report_Language" class and associated that with the "Language" instance above? (also verify this is checked as "enabled")

If you've done both of these, are you able to share either screenshots or a sample repository? Any more detail you can provide would be useful in helping to resolve this.

Thanks

Neil
v93ry
Posts: 12
Joined: 27 Jul 2015, 19:48

I have already done these steps. I am sending the screenshots with the detailed configuration in my repository.

Thank You in advance for any help!
You do not have the required permissions to view the files attached to this post.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Thanks for this,

Just to make sure - have you associated this Synonym instance with the relevant Report instance by adding this Synonym instance with the 'synonym' slot of the relevant Report instance?

Jonathan
Essential Project Team
User avatar
neil.walsh
Posts: 444
Joined: 16 Feb 2009, 13:45
Contact:

Hi,

Let me try to run through the process....

1. Create a instance on a Language you plan to use. (populate the language code, label, two name slots and the language icon slots)
2. Create a report language and associate that with the language instance defined above
3. Create some instances of the classes your interested in (e.g. some technology products)
4. For each technology product you create a synonym. The Name slot on the synonym is the "Name" translation. Associate the language defined above with the synonym.
5. In the Viewer, select the language you wish to use from the top right hand corner.
6. You should now see the translations of the instance names from into your new language.

To translate the static text (or chrome as we call it)

7. In the Language folder of the viewer web app, copy the en-gb.xml file
8. Rename this copied file to use the language code define in step 1
9. Edit this file and update the <value></value> attributes with the translations for each of the messages. Do not change any data in the <name> attributes.

If you wish to set the new language as the default language then you can edit the web.xml file in the web-inf folder and change the following value

Code: Select all

<context-param>
	<param-name>i18nDefault</param-name>
	<param-value>en-gb</param-value>
</context-param>
If you're planning to create a translation of the static text in Viewer (by creating the new xml file) then would you be happy to share this with the community? If so, we can look to roll this into a future release.

Let me know if you're still running into any issues.

Cheers

Neil
v93ry
Posts: 12
Joined: 27 Jul 2015, 19:48

Sorry but I have already followed the listed steps and Synonym class is not working. Actually, if you take a look in the screenshots, I have created a Synomyn class for "Core: Application Data Dependency Model" and the portuguese synonym is "Modelo de Dependência de Dados de Aplicação" and is not working. I really intend to share my stactic xml file with you guys, since you really created a great product. Congratulations!
v93ry
Posts: 12
Joined: 27 Jul 2015, 19:48

I have found one interesting thing after some tests. It seems the Synonym class is not working only for the classes that have a Label field in the viewer. For example the "Core: Application Data Dependency Model" class have the field Report Label and it seems that is the reason it is not working with the synomym class. For the other side the "Application Provider" class does not have any label field and it is woking with the synonym class that I have created.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Thanks for the update.

This makes some sense. Can you tell whether the eas:i18n() function is being used in the Views that are trying to render those instances (that are using the Label slot rather than Name slot)?
Thanks

Jonathan
Essential Project Team
v93ry
Posts: 12
Joined: 27 Jul 2015, 19:48

Actually eas:i18n() is not been used for home.xsl is some specifics points in the view.
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Indeed - my mistake. eas:i18n() translates the static "chrome" on the views but the RenderInstanceLink() XSL function takes care of rendering instances and performing any translations dynamically.

However, the RenderInstanceLink() method takes care of this - and is extensible - so that if this function is called on a Report instance (the definition of a View), it knows to use the report_label slot rather than the Name slot and will pick a translation for this.

Is the issue that you are seeing happening with all reports on the homepage?
Also, are you using the out-of-the-box homepage - it's possible that this does not fully support the internationalisation at the moment.

Thanks

Jonathan
Essential Project Team
v93ry
Posts: 12
Joined: 27 Jul 2015, 19:48

Yes John the issue is happening in all reports on the homepage. I am using the out-of-the-box homepage. In other words currently we have to change the home.xsl. Is it rigth?
User avatar
jonathan.carter
Posts: 1087
Joined: 04 Feb 2009, 15:44

Hi,

I've checked with home.xsl and it is using the eas:i18n() function. However, this is only for the 'static' text such as the labels, headings etc. on the View.
This is a very data-driven view where the set of views that are displayed is controlled from within the repository itself - via the Report instances.

What this means is that, in order to have the translations for your selected language, you will need:
  • A language file for the 'static' text such as the descriptions and titles on the homepage. This must be saved in the 'language' folder and named using the language code, e.g. en-gb.xml, fr-fr.xml etc. An empty en-gb.xml file is available, that you can copy and then add the translations into the <value> elements each <message>
  • Within the repository, check that your chosen language is defined in the Language class. Then for each Report instance, create a Synonym instance for the Report object, setting the name, description and language to capture the translation for that Report (View).
With these in place, both the static content and the View labels should all be translated on the home page. Also, these translations will be re-used across the viewer, which saves effort!

There is some useful documentation on how to set up the 'static' translations on the Essential website but let me know if I haven't explained clearly.

Jonathan
Essential Project Team
v93ry
Posts: 12
Joined: 27 Jul 2015, 19:48

Thank You!
Post Reply