1

Topic: Field Labels

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2
- Deployed with iRedMail Easy or the downloadable installer? DL installer
- Linux/BSD distribution name and version: Centos7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

It would be great if you could implement at some point a language file for the field names in the user profile add/edit page rather than having them hard-coded. We use some of the fields for info different that what the labels are, for instance we use the "Job Title" field for address info. At first I modified the source code to change the labels, but having to do that every time there is an update is not an ideal solution.

2

Re: Field Labels

Updating the translation file is the only way i can tell. sad

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

3

Re: Field Labels

Thanks, I hadn't thought of the translation files.

I tried editing the file i18n/en_US/LC_MESSAGES/iredadmin.po

and changed
msgid "Job Title"
msgstr ""

to
msgid "Job Title"
msgstr "Address"

But I see no change in the interface. I restarted nginx, uwsqi, and iredadmin and the user interface page still show: "Job Title"

Am I missing something?
Thanks.

4

Re: Field Labels

After changed the ".po" file, you still need to compile it to ".mo" file, then restart "iredadmin" service.

cd /opt/www/iredadmin/i18n/<LANG-CODE>/LC_MESSAGES/
msgfmt iredadmin.po -o iredadmin.mo
service iredadmin restart

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

5

Re: Field Labels

I did that, no change. I have the default language set to English (US)
The file I changed is /var/www/iredadmin/i18n/en_US/LC_MESSAGES/iredadmin.po
Changed this:
msgid "Job Title"
msgstr "Address:" (I added the colon so I could grep the binary file for a unique word)

I had used this info for "Convert po file to mo format" from the page https://forum.iredmail.org/topic378-faq … guage.html - bash translation.sh en_US which created the .mo file. No change in the front end

This morning I tried your suggestion:
msgfmt iredadmin.po -o iredadmin.mo
- which also created an updated iredadmin.mo file (I deleted the old .mo file created last week first)
service iredadmin restart

[root@mail LC_MESSAGES]# grep Address: *
Binary file iredadmin.mo matches
iredadmin.po:msgstr "Address:"

Shows the change is in the binary file.

Still no change in the front end

Tried restarting all services, no change - rebooted server - no change

Suggestions? Thanks.

6

Re: Field Labels

Interesting now.

With en_US, iRedAdmin-Pro returns the original text without translation (for better performance), so it doesn't read 'i18n/en_US/*' files at all.

Try this:

- Open file "libs/iredutils.py", find line ~= 366 like this:

all_translations = {"en_US": gettext.NullTranslations()}

- Replace it by:

all_translations = {}

- Restart "iredadmin" service and try again.

Let me know how it works. smile

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee

7

Re: Field Labels

That did it.
Thanks.

8

Re: Field Labels

So if I create a new translation, for instance "en_ZZ" with my text overrides and set that as the default, it would work without that change to iredutils.py?

9

Re: Field Labels

jstewart wrote:

So if I create a new translation, for instance "en_ZZ" with my text overrides and set that as the default, it would work without that change to iredutils.py?

It should work, but i didn't test it before.

----

Buy me a cup of coffee ($5) to support iRedMail:

buy me a cup of coffee