Hello, 
To make easier to understand, what was done and what exactly is the problem:

Installation is Pacetfence 9.3 on debian 9. Upgraded from 9.0.3 because of
same problem with languages.

1. We downloaded packetfence_lv.po file from
https://www.transifex.com/inverse/packetfence/language/lv/ and added some
translations.
2. packetfence.po file header looks this way:

# Copyright (C) Inverse inc.
# English translations for PacketFence package.
#
# This file is distributed under the same license as the PacketFence
package.
#
# Translators:
# Juris BALANDIS, 2017
msgid ""
msgstr ""
"Project-Id-Version: PacketFence\n"
"POT-Creation-Date: YEAR-MO-DA HO:MI+ZONE\n"
"PO-Revision-Date: 2020-03-21 01:44+0200\n"
"Last-Translator: inverse <i...@inverse.ca>\n"
"Language-Team: Latvian (http://www.transifex.com/inverse/packetfence/";
"language/lv/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: lv\n"
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n != 0 ? 1 : "
"2);\n"
 
3. Added lines for LV  to this file (after lines for italian):

# pf::web::constants (Locales)
msgid "lv_LV"
msgstr "lv_LV"

4. File renamed as packetfence.po and put into directory
/usr/local/pf/conf/locale/lv/LC_MESSAGES
5. Run  script /usr/bin/msgfmt to produce .mo file. Resulting file has name
messages.mo . 
6. Renamed messages.mo to packetfence.mo and changed owner to pf (chown -R
pf:pf ).
7. Added lv_LV to locales list in the file
/usr/local/pf/lib/web/constants.pm:

Readonly::Array our @LOCALES =>
  (
   qw(en_US es_ES fr_FR fr_CA de_DE he_IL it_IT lv_LV nl_NL pl_PL)
  );

8. Rebooted machine.


Still don’t see LV language in the language choice in profiles (screenshot
attached):

I saw some very similar thread about Slovakian language, but for it this
steps worked, as much as I understand. But not for me.


By the way, as you can see, I deleted pt_BR  from list in
/usr/local/pf/lib/web/constants.pm , but it is still displayed, as you can
see on screenshot.

So this language list comes from some other place or is cached. 

Any ideas are highly appreciated.

Regards,

Eizens



From: Eizens Putnins [mailto:eiz...@maxicom.lv] 
Sent: 23 March 2020 15:16
To: packetfence-devel@lists.sourceforge.net
Subject: Where is language list configured in Packetfence?
Importance: High


Hello,
There does exist Packetfence translation file for Latvian language in
https://www.transifex.com/inverse/packetfence/language/lv/. 

So I have added *.po and *.mo files for Latvian language from transifex into
lv_LV subdirectory, same way as  other languages:
/usr/local/pf/conf/locale/lv_LV/ .
This files are not 100% translated, but they have translation for all ever
needed parts (as we anyway prefer to have admin interface in English anyway,
and need just connection messages in local language).  
But files *.mo / *.po files are not a concern (we can translate anything
missing easy) – problem is that there is no Latvian language at all in the
list of available languages when configure access profiles. There are
multiple different languages (less than exist on transifex), so there must
be somewhere configuration of this list:


All language files which are in the list, exist in respective folders. So
there are also  Latvian language files, but for Latvian there is no entry in
the list. I can’t find any file where this list is configured, so may be
this language list is just hard-coded into respective scripts? It would be
not a problem also, if there would be documented which scripts I need to
edit to add a language.

Please, advice how to get Latvian language added to list -- it is not
described in documentation or elsewhere.  

Thanks in advance,

Regards, 



|Eižens Putniņš|CEO|Mob. +371 29459183| |eizens.putn...@maxicom.lv
|www.maxicom.lv|
MCNE, MCSE, CCNP, CCDA
       
IT risinājumi Jūsu vajadzībām

_______________________________________________
PacketFence-devel mailing list
PacketFence-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/packetfence-devel

Reply via email to