-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with .js translation files and global t() helper within applications #10959
Comments
We can't reproduce this. The PHP and the JS translations work without problems. What specific strings do you have problems with? Also upgrading your Nextcloud instance helps to get the latest translation strings into the code. |
Hi Morris, thank you for your attention. In nextcloud 13.0.2, when changing to a different language (farsi in our case), the PHP translations work fine, but the js ones don't get translated (none of them) and the translation key in English gets printed. We need to use this version because we are using some apps like rainloop that do not support newer versions of nextcloud. Currently, we are hardcoding the strings we need in our language in js files but if there is a better way to do this we would like to do that. If you can not reproduce this please kindly let us know what may have caused this problem in js translations. It may be something we are missing in our installation and our configuration. We set the default language to "fa" and it did not work. Then we forced "fa" and it did not work either. |
I'm closing this issue due to inactivity. If this is still happening please make sure to upgrade to the latest version. After that, feel free to reopen. |
When I change the language from English to another supported language, the php translation files (.json) work properly. However, inside the l10n folder corresponding to the application, there are two types of translation files .json and .js. I have noticed that the labels in .js files never get translated inside the application (for instance contacts application). The nextcloud documentation says we should use t('app_name', 'Label') in order for the right translation of the label to get printed. However, in the case of javascript translations, only the label itself gets printed all the time. I am using nextcloud 13.0.2 and I am experiencing this problem at least in contacts and tasks applications.
Steps to reproduce
Expected behaviour
The right translation should get printed corresponding to the selected language.
Actual behaviour
The label itself gets printed in English.
Server configuration
Operating system: Fedora 25
Web server: Apache
Database: MariaDB
PHP version: 7.1
Nextcloud version: 13.0.2
Updated from an older Nextcloud/ownCloud or fresh install: fresh install
Where did you install Nextcloud from: Github
List of activated apps: contacts, tasks, calendar, files
Nextcloud configuration:
$CONFIG = array (
'instanceid' => 'octhji0e1mmi',
'passwordsalt' => ,
'secret' => ,
'trusted_domains' =>
array (
0 => 'nextcloud.local',
),
'datadirectory' => '/home/moblue7/public_html/nextcloud/data',
'overwrite.cli.url' => 'http://nextcloud.local',
'dbtype' => 'mysql',
'version' => '13.0.2.1',
'dbname' => 'nextcloud',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'oc_admin3',
'dbpassword' => ,
'installed' => true,
'updater.release.channel' => 'stable',
'force_language' => 'fa',
'maintenance' => false,
);
Browser: Firefox
The text was updated successfully, but these errors were encountered: