Translation problem in module

Translation problem in module

Nosūtīja Serafim Panov
Atbilžu skaits: 7

Hello!


I've strange problem with my module after updating moodle to 2.7 

I see [maximumsize] and [allowdeleting]

I see this even after adding new lines in my lang/en/module.php file:

$string['maximumsize'] = 'Max size';

$string['allowdeleting'] = 'Allow Deleting';


translation problem with my module


Where is the problem?

Vidējais novērtējums: -
Atbildot uz Serafim Panov

Re: Translation problem in module

Nosūtīja David Mudrák
Core developers attēls Documentation writers attēls Moodle HQ attēls Particularly helpful Moodlers attēls Peer reviewers attēls Plugin developers attēls Plugins guardians attēls Testers attēls Translators attēls

Please try to purge caches. if it helps, let me recommend to put the following line into your config.php at your development machine:

$CFG->langstringcache = false;
Atbildot uz David Mudrák

Re: Translation problem in module

Nosūtīja Serafim Panov

It is doesn't help. Maybe need to change my language file location? current location: "module/lang/en/module.php"

Atbildot uz Serafim Panov

Re: Translation problem in module

Nosūtīja David Mudrák
Core developers attēls Documentation writers attēls Moodle HQ attēls Particularly helpful Moodlers attēls Peer reviewers attēls Plugin developers attēls Plugins guardians attēls Testers attēls Translators attēls
What is your plugin type and plugin name? For all plugins, the expected location is lang/en/plugintype_pluginname.php. Only activity modules (plugintype 'mod') are exception as they use lang/en/pluginname.php for legacy reasons.
Atbildot uz David Mudrák

Re: Translation problem in module

Nosūtīja Serafim Panov

I'm making videoboard version for moodle 2.7. It is moodle module. But I can't solve this issue and can't understand why. I've attached my current lang file. New lines at the end of file.


https://github.com/spnova/videoboard

Atbildot uz Serafim Panov

Re: Translation problem in module

Nosūtīja David Mudrák
Core developers attēls Documentation writers attēls Moodle HQ attēls Particularly helpful Moodlers attēls Peer reviewers attēls Plugin developers attēls Plugins guardians attēls Testers attēls Translators attēls

OK. Make sure the get_string() call reads

get_string('maximumsize', 'videoboard')

or even better try to commit the version that does not work for you to a separate branch in your repository so we can see it in context. And turn the debugging mode to DEBUG_DEVELOPER and let those debug messages be displayed. It reports useful information on missing strings (such as expected location).