← Back to team overview

mahara-contributors team mailing list archive

[Bug 1417120] Re: non-english lang no used in theme

 

Hm, on further investigation it looks like this is actually how *other*
plugins work as well, not just themes. I had thought that lang strings
were the same as theme assets now are, that they could live under the
plugin directory. But the code actually doesn't look there. It *only*
looks in these locations (in order):

1. <DOCROOT>/local/lang/<LANG>.utf8/theme.<THEMENAME>.php
2. <DATAROOT>/langpacks/<LANG>.utf8/theme/<THEMENAME>/lang/theme.<THEMENAME>.php
3. <DOCROOT>/local/lang/en.utf8/theme.<THEMENAME>.php
3. <DOCROOT>/theme/<THEMENAME>/lang/en.utf8/theme.<THEMENAME>.php

So, we should update the documentation accordingly. And fix the code so
that it checks for lang files inside the plugin & theme directories
themselves (much like we now do with themes). This'll make it much
easier to distribute plugins & themes for multilingual audiences.

For the time being, your workarounds are to copy the theme lang files
into the langpacks directory in your dataroot, or into the local
directory as you've noticed.

Cheers,
Aaron

** Summary changed:

- non-english lang no used in theme
+ Non-English lang strings distributed with Themes & Plugins aren't loaded.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1417120

Title:
  Non-English lang strings distributed with Themes & Plugins aren't
  loaded.

Status in Mahara ePortfolio:
  Confirmed
Status in Mahara 1.10 series:
  Confirmed
Status in Mahara 15.04 series:
  Confirmed

Bug description:
  Based on the doc here:
  https://wiki.mahara.org/index.php/Customising/Themes/1.10#Theme_lang_strings

  Theme language strings work in English, but non-English theme language
  strings are not loaded.

  To reproduce:
  1. On a custom theme add a French lang string like explained here:
  https://wiki.mahara.org/index.php/Customising/Themes/1.10#Theme_lang_strings

  2. Change your language to French

  Expected:
  The French lang string should be used

  Actual:
  The French lang string is not used

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1417120/+subscriptions


References