[Koha-bugs] [Bug 12017] Move language description out of database

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Wed Apr 2 06:43:58 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12017

--- Comment #8 from Bernardo Gonzalez Kriegel <bgkriegel at gmail.com> ---
Created attachment 26736
  -->
http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26736&action=edit
Bug 12017 - Move language description out of database

This patch moves language descriptions from database into template files, in
part to ease the translation of some strings, but mostly to have one place to
define languages.

All languages/scripts/regions are defined at languages.inc template file, with
native versión and translatable version.

As a bonus, language descriptions are present at webinstaller stage.

To test:
1) Do some fake translations, for example all langs
for l in $(cd misc/translator/po; ls *-pref.po | sed 's/-pref.po//'); do
mkdir koha-tmpl/intranet-tmpl/prog/$l;
mkdir koha-tmpl/opac-tmpl/bootstrap/$l;
mkdir koha-tmpl/opac-tmpl/prog/$l;
mkdir koha-tmpl/opac-tmpl/ccsr/$l;
done

2) Go to Administration > System preferences > I18N/L10N
There are many missing descriptions

3) Enable some random languages, some in groups (fr|en) on staff/opac. Enable
OPAC changelanguage

4) Reload page, look at the bottom for language changer. Also open a OPAC view,
look for language changer.
Do NOT change languages

5) Apply the patch

6) Reload STAFF page, verify all descriptions in native language.

7) CHANGE in Language changer (staff/opac).
Currently we show Lang+Code, and in lang groups Lang+Script+Region+Code
I think it's too long, I propose to show only Lang, and in groups Region+Code,
all native.

Change OPAC theme (prog|ccsr) and check again. On prog and ccsr the result is
not pretty, but works

8) Go to Administration > System preferences > Local use
Add a new local syspref, any Explanation|Variable|Value, type Languages, Save.
Check that all languages look good. Also Edit that syspref, on edition a list
of languages must show in value box, check that they look good

NOTE: There is a Bug in this kind of preference, selected languages are passed
but ignored at save/load time. Only staff selected languages are shown. A
problem for another report

9) NEW - Installer languages. This patch enable view of languages on Web
installer.
Edit your koha-conf.xml, change database name to a new name, create that
database and grant access, reload staff page, log in, you will be redirected to
step1 of installer, check names and codes for installed languages.
(revert to your old database before proceed)

10) Advanced Search. On staff/opac{bootstrap/prog/ccsr}, go to advanced search,
clic more options, go to limit by language, select one and press search, verify
the search term "Search  with limit(s): 'ln,rtrn:XXX'" with XXX the iso639-2
code of your selected lang

NOTE: This is the ONLY place where translated language names are used!!!

11) Translations. Update language files for one of the active languages, say
de-DE
(cd misc/translator; perl translate update de-DE;
perl translate update de-DE; perl translate install de-DE)

12) Change language to German (DE), go to advanced search 'Suche' (staff), clic
'mehr Optionen', look for 'Sprache' pulldown, verify some translations (ej.
Greek -> Griechisch) [this translations are not present on opac]

I think that all previous functionality is present.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list