Rename existing default actions in framework

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
NicoAMP
Posts: 98
Joined: Tue Mar 06, 2018 2:07 pm
Contact:

Rename existing default actions in framework

Post by NicoAMP »

Hello,

In an Oxygen Web Author Framework (.exf), I would like to use some existing actions provided by default, but I would like to rename them.

Code: Select all

<group name="My group" largeIconPath="${framework}/icons/Topicref24.png" smallIconPath="${framework}/icons/Topicref16.png">
          <addAction id="reuse.content"/><!-- to be renamed by "xxx" in menu -->
          <addAction id="DITA/ReuseKeys"/><!-- to be renamed by "yyy" in menu -->
</group>
Is there a way to achieve this?

Thanks.
Nicolas Delobel
AmeXio
nicolas.delobel at amexiogroup.com
mihaela
Posts: 504
Joined: Wed May 20, 2009 2:40 pm

Re: Rename existing default actions in framework

Post by mihaela »

Hello,

You can try to add a translation file in your framework, where to add new translations for the two actions tags:
https://www.oxygenxml.com/doc/versions/ ... works.html
Please let us know if this solution is not suitable for your use case.

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
NicoAMP
Posts: 98
Joined: Tue Mar 06, 2018 2:07 pm
Contact:

Re: Rename existing default actions in framework

Post by NicoAMP »

Hello,

I use a translation file and it works fine for reuse.content action.

Code: Select all

<key type="action" value="reuse.content">      
      <val lang="en_US">xxx</val>      
      <val lang="de_DE">xxx</val>      
      <val lang="fr_FR">xxx</val>      
      <val lang="ja_JP">xxx</val>      
      <val lang="nl_NL">xxx</val>      
      <val lang="zh_CN">xxx</val>      
   </key>
But it doesn't work for DITA/ReuseKeys

Code: Select all

<key type="action" value="DITA/ReuseKeys">      
      <val lang="en_US">yyy</val>      
      <val lang="de_DE">yyy</val>      
      <val lang="fr_FR">yyy</val>      
      <val lang="ja_JP">yyy</val>      
      <val lang="nl_NL">yyy</val>      
      <val lang="zh_CN">yyy</val>      
   </key>
I found no entry for DITA/ReuseKeys action in the translation.xml file of the original DITA framework.
Thanks for your help.
Nicolas Delobel
AmeXio
nicolas.delobel at amexiogroup.com
mihaela
Posts: 504
Joined: Wed May 20, 2009 2:40 pm

Re: Rename existing default actions in framework

Post by mihaela »

Hello,

For DITA/ReuseKeys action there are two translations, one for the action name and one for the description.
Here are the values that you have to use for the two keys: DITA_KEYS_ and DITA_KEYS_DESCRIPTION_.

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
NicoAMP
Posts: 98
Joined: Tue Mar 06, 2018 2:07 pm
Contact:

Re: Rename existing default actions in framework

Post by NicoAMP »

Hello,
I tried like that :

Code: Select all

<key type="action" value="DITA_KEYS_">     
      <val lang="en_US">yyy</val>      
      <val lang="de_DE">yyy</val>      
      <val lang="fr_FR">yyy</val>      
      <val lang="ja_JP">yyy</val>      
      <val lang="nl_NL">yyy</val>      
      <val lang="zh_CN">yyy</val>      
   </key>

   <key type="action" value="DITA_KEYS_DESCRIPTION_">     
      <val lang="en_US">yyy</val>      
      <val lang="de_DE">yyy</val>      
      <val lang="fr_FR">yyy</val>      
      <val lang="ja_JP">yyy</val>      
      <val lang="nl_NL">yyy</val>      
      <val lang="zh_CN">yyy</val>      
   </key>
But it's not translated in my menu entry :
image.png
image.png (2.49 KiB) Viewed 1253 times
Regards,
Nicolas
Nicolas Delobel
AmeXio
nicolas.delobel at amexiogroup.com
mihaela
Posts: 504
Joined: Wed May 20, 2009 2:40 pm

Re: Rename existing default actions in framework

Post by mihaela »

Hello,

I have checked again and the translations for DITA keys action are included in the general translation of the Web Author UI, so you will be able to replace them by using the following javascript API:
https://www.oxygenxml.com/maven/com/oxy ... ation.html
You can use this code inside a plugin. See more details here:
https://www.oxygenxml.com/maven/com/oxy ... 0.0/jsdoc/

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
NicoAMP
Posts: 98
Joined: Tue Mar 06, 2018 2:07 pm
Contact:

Re: Rename existing default actions in framework

Post by NicoAMP »

It works fine.
Thanks Mihaela for your help.
Regards,
Nicolas
Nicolas Delobel
AmeXio
nicolas.delobel at amexiogroup.com
mihaela
Posts: 504
Joined: Wed May 20, 2009 2:40 pm

Re: Rename existing default actions in framework

Post by mihaela »

Hello,

Great! We are glad that you managed to add the translations.

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Post Reply