Menu

Trying to change IT dictionary labels

raf
2020-06-12
2020-06-12
  • raf

    raf - 2020-06-12

    Hi,

    I'm trying to correct some words that are written badly in italian dictionary. I read in iTop Documentation that I can create a new extension. The example shows that I have to change the xml file like this:

    <dictionary id="EN US" _delta="must_exist">
      <entries>
        <entry id="Class:UserRequest/Attribute:caller_id" _delta="redefine">
          <![CDATA[Beneficiary]]>
        </entry>
        <entry id="Class:UserRequest/Attribute:caller_id+" _delta="force">
          <![CDATA[Choose the client person who will get the requested service]]>
        </entry>
      </entries>
    </dictionary>
    

    What I wrote is:

    <?xml version="1.0" encoding="UTF-8"?>
    <itop_design xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0">
    <dictionary id="IT IT" _delta="must_exist">
          <entries>
            <entry id="Class:Group" _delta="redefine">
              <![CDATA[Gruppo]]>
            </entry>
            <entry id="Class:lnkGroupToCI" _delta="redefine">
              <![CDATA[Gruppo / CI]]>
            </entry>
            <entry id="Class:lnkGroupToCI/Attribute:group_id" _delta="redefine">
              <![CDATA[Gruppo]]>
            </entry>
          </entries>
    </dictionary>
    </itop_design>
    

    When running setup I get this error:
    Error loading module "ita-dictionary-correct": /itop_design/dictionary[IT IT] at line 3: could not be found - Loaded modules: dictionaries,core,application,authent-external,authent-ldap,authent-local,ita-dictionary-correct

    I know that something is missing.. what am I doing wrong?

    Please help me!
    Thank you

    Raffaella

     
  • Guillaume Lajarige

    Hello Raffaella,

    If you check here, you will see that your XML is missing the dictionaries level.

    Note that if you change an entry that was brought by another extension, your extension must have a dependency on that extension.

    Hope this helps,
    Guillaume

     
    • raf

      raf - 2020-06-12

      Hi Guillaume,

      You're right! thank you. I added that level. The entries that I have to change are the original ones of iTop. I think I'm not able to link my extension to those italian dictionaries that already exist in site/dictionaries/... or in site/datamodels/..
      I just want to edit entries of this file: /var/www/html/site/datamodels/2.x/itop-config-mgmt/it.dict.itop-config-mgmt.php :(

      Raffaella

       
  • Guillaume Lajarige

    Okay, as the dictionary files in this extension are not in the XML, you need to change the delta flag from "redefine" to "force".

    Also add a dependency to "itop-config-mgmt/2.4.0" in your module.xxx.php.

    If that still doesn't work, share your extension here so we can troubleshoot :)

    Guillaume

     
    • raf

      raf - 2020-06-12

      That worked!!! Thank you so much Guillaume!!!!

       
      • Guillaume Lajarige

        Glad to hear it worked!

        Feel free to share it with us, if you want the translations to be integrated in the future release of iTop :)

        Guillaume

         
  • raf

    raf - 2020-06-12

    Solved it

     

    Last edit: raf 2020-06-12

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.