Custom field Name translation

Hello! Please help with detailed instructions about translation custom field names.
I’m create new custom field “testfield1” for users, edit share/html/Elements/ShowCustomFields:

  • <% $CustomField->Name %>:
  • <% loc($CustomField->Name) %>:

And edit share/po/ru.po:
#. (loc($CustomField->Name))
#: share/html/Elements/EditCustomFields:66
msgid "%1"
msgstr “блаблабла1”

But nothing happens :frowning:

. (loc($CustomField->Name))
: share/html/Elements/ShowCustomFields:58
msgid "%1"
msgstr “блаблабла1”

Don’t worked too

I think you forgot to cleanup mason cache. When you change a file in share/html, you have to cleanup mason cache and restart http server. When you change a .po file, you have to restart your http server.

So try again after: rm -rf /opt/rt4/var/mason_data/obj/* ; service apache2 restart

(replace apache2 with your web service)

Cleaning does not help

  1. do not edit share/po/*.po, add new files in local/po/ directory
  2. your po line looks wrong, you should add for each customfield name, two lines:
    msgid "Customfield Name"
    msgstr “Localized customfield name”

Example, if you have a customfield with name “server”, create the following file /opt/rt4/local/po/ru.po with the following content, then restart your web server:

msgid ""
msgstr ""
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"

msgid "server"
msgstr "сервер"
  1. im delete all changes in share/po directory
  2. create new ru.po in local/po directory
  3. clean cache and restart apache
  4. testfield1 is still testfield1 if I create user

Problem solved:
sudo rm -rf /opt/rt4/var/mason_data/obj/*
does not work.

sudo -s
rm -rf /opt/rt4/var/mason_data/obj/*
works fine