Enhancement #2638
Translator fallback language
Status: | CLOSED | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | - | % Done: | 100% | |
Category: | nethserver-nethgui | |||
Target version: | v6.5-rc1 | |||
Resolution: | NEEDINFO: | No |
Description
Define a fallback language chain for the translate()
method. If a label is not found for the requested language, try to retrieve it from the fallback language chain. At least en
language must be defined.
Implement also a general switch to disable the fallback mechanism: the current behaviour (showing the label itself if translation is not found) is convenient during development.
Associated revisions
Translator: use English as fallback language. Refs #2638
If NETHGUI_DEBUG is TRUE, fallback language is not used and the label
itself is printed.
History
#1 Updated by Giacomo Sanchietti over 7 years ago
- Target version set to ~FUTURE
#2 Updated by Davide Principi over 7 years ago
- Target version deleted (
~FUTURE)
#3 Updated by Giacomo Sanchietti over 7 years ago
- Priority changed from Normal to Low
#4 Updated by Davide Principi over 7 years ago
- Status changed from NEW to TRIAGED
- Priority changed from Low to Normal
- % Done changed from 0 to 20
#5 Updated by Davide Principi over 7 years ago
- Status changed from TRIAGED to ON_DEV
- Assignee set to Davide Principi
- % Done changed from 20 to 30
#6 Updated by Davide Principi over 7 years ago
- Status changed from ON_DEV to MODIFIED
- % Done changed from 30 to 60
Test case
- Rename Nethgui.php:
# mv /usr/share/nethesis/Nethgui/Language/it/Nethgui{.php,.bak}
- Connect to https://hostname:980/index_dev.php/it/LocalNetwork: untranslated button labels are shown.
- Connect to https://hostname :980/it/LocalNetwork: button labels are written in English.
Restore Nethgui.php:
# mv /usr/share/nethesis/Nethgui/Language/it/Nethgui{.bak,.php}
#7 Updated by Davide Principi over 7 years ago
- Status changed from MODIFIED to ON_QA
- Assignee deleted (
Davide Principi) - % Done changed from 60 to 70
In nethserver-testing:
nethserver-nethgui-1.3.2-11.0git10ba88af.ns6.noarch.rpm
#8 Updated by Giacomo Sanchietti over 7 years ago
- Assignee set to Giacomo Sanchietti
#9 Updated by Giacomo Sanchietti over 7 years ago
- Status changed from ON_QA to VERIFIED
- Assignee deleted (
Giacomo Sanchietti) - % Done changed from 70 to 90
- Renamed Italian translation
- access with index_dev.php shows untranslated labels
- access with normal url shows English translation
- Renamed English translation:
- access with index_dev.php shows untranslated labels
- access with normal url shows untranslated labels
Marking as VERIFIED
#10 Updated by Davide Principi over 7 years ago
- Status changed from VERIFIED to CLOSED
- % Done changed from 90 to 100
#11 Updated by Davide Principi over 7 years ago
In nethserver-updates:
nethserver-release-6.5-4.ns6.rc1.noarch.rpm
nethserver-devbox-1.4.0-1.ns6.noarch.rpm
nethserver-backup-data-1.0.9-1.ns6.noarch.rpm
nethserver-base-2.1.0-1.ns6.noarch.rpm
nethserver-directory-2.0.1-1.ns6.noarch.rpm
nethserver-firewall-base-1.1.0-1.ns6.noarch.rpm
nethserver-hosts-1.0.7-1.ns6.noarch.rpm
nethserver-httpd-2.3.0-1.ns6.noarch.rpm
nethserver-httpd-admin-1.2.1-1.ns6.noarch.rpm
nethserver-hylafax-1.0.5-1.ns6.noarch.rpm
nethserver-ibays-2.0.3-1.ns6.noarch.rpm
nethserver-lib-2.0.1-1.ns6.noarch.rpm
nethserver-mail-server-1.6.1-1.ns6.noarch.rpm
nethserver-nethgui-1.4.0-1.ns6.noarch.rpm
nethserver-ntopng-1.1.2-1.ns6.noarch.rpm
nethserver-nut-1.0.7-1.ns6.noarch.rpm
nethserver-openssh-1.0.5-1.ns6.noarch.rpm
nethserver-roundcubemail-0.0.2-1.ns6.noarch.rpm
nethserver-samba-1.4.2-1.ns6.noarch.rpm
nethserver-shorewall-1.0.4-1.ns6.noarch.rpm
nethserver-sogo-thunderbird-1.1.1-1.ns6.noarch.rpm
nethserver-vpn-1.1.2-1.ns6.noarch.rpm
sogo-frontends-1.3.0-1.ns6.noarch.rpm