Re: [PacketFence-devel] Where is language list configured in Packetfence?
Thanks, It’s really good to know – we are going to test it now. I’ll make you know, if it worked for us. By the way, may be you know if it is possible to make letsencrypt working in Packetfence -- when I try to activate this service from GUI, I get error, which I understand means that Packetfence uses old v.1 agent not supported anymore by letsencrypt? Regards, Eizens From: Fabrice Durand [mailto:fdur...@inverse.ca] Sent: 26 March 2020 13:52 To: packetfence-devel@lists.sourceforge.net Subject: Re: [PacketFence-devel] Where is language list configured in Packetfence? Hello Eizens, yes, you need to rebuild the admin gui, it's not something complicate: First install nodejs (latest version) https://nodejs.org/en/download/package-manager/#enterprise-linux-and-fedora Then is /usr/local/pf do: make -C html/pfappserver/root/static.alt/ vendor make -C html/pfappserver/root/static.alt/ light-dist Regards Fabrice Le 20-03-26 à 06 h 16, Eizens Putnins a écrit : Hi, It seems correct comment, so I have added lv_LV locale to pfLocales.js script. Unfortunately, I still can’t see lv_LV locale in the list, so it doesn’t change anything. I also tried to delete pt_BR from this list in script, and it is not removing entry from profile configuration. I suspect that data are compiled and cached somewhere, and I need to update that cache to see any changes. I have looked if locales are present in other PF files, but haven’t found nothing editable. There are locales used in many scripts, mainly to service different kind of exceptions, but nothing which seems related to locale list… I see that there are some users, which successfully added own language translation, so it is possible. At least users who succeeded and also PF maintainer, who adds new languages definitely know how he does it. I am probably missing some step: * May be I need change some setting in some file * May be I need to run some script which deletes cached values and reads from configuration files new configuration * May be I need to use some magic (unfortunately, that seems impossible to me) Any ideas will be very much appreciated… Eizens From: Fabrice Durand [mailto:fdur...@inverse.ca] Sent: 25 March 2020 14:18 To: packetfence-devel@lists.sourceforge.net <mailto:packetfence-devel@lists.sourceforge.net> Subject: Re: [PacketFence-devel] Where is language list configured in Packetfence? Hello Eizens, what you are searching for is probably here: https://github.com/inverse-inc/packetfence/blob/devel/html/pfappserver/root/static.alt/src/globals/pfLocales.js Regards Fabrice Le 20-03-23 à 13 h 10, Eizens Putnins a écrit : 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 <mailto: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 c
Re: [PacketFence-devel] Where is language list configured in Packetfence?
Hi, It seems correct comment, so I have added lv_LV locale to pfLocales.js script. Unfortunately, I still can’t see lv_LV locale in the list, so it doesn’t change anything. I also tried to delete pt_BR from this list in script, and it is not removing entry from profile configuration. I suspect that data are compiled and cached somewhere, and I need to update that cache to see any changes. I have looked if locales are present in other PF files, but haven’t found nothing editable. There are locales used in many scripts, mainly to service different kind of exceptions, but nothing which seems related to locale list… I see that there are some users, which successfully added own language translation, so it is possible. At least users who succeeded and also PF maintainer, who adds new languages definitely know how he does it. I am probably missing some step: * May be I need change some setting in some file * May be I need to run some script which deletes cached values and reads from configuration files new configuration * May be I need to use some magic (unfortunately, that seems impossible to me) Any ideas will be very much appreciated… Eizens From: Fabrice Durand [mailto:fdur...@inverse.ca] Sent: 25 March 2020 14:18 To: packetfence-devel@lists.sourceforge.net Subject: Re: [PacketFence-devel] Where is language list configured in Packetfence? Hello Eizens, what you are searching for is probably here: https://github.com/inverse-inc/packetfence/blob/devel/html/pfappserver/root/static.alt/src/globals/pfLocales.js Regards Fabrice Le 20-03-23 à 13 h 10, Eizens Putnins a écrit : 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 <mailto: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 <mailto: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 con
Re: [PacketFence-devel] Where is language list configured in Packetfence?
Hello Eizens, what you are searching for is probably here: https://github.com/inverse-inc/packetfence/blob/devel/html/pfappserver/root/static.alt/src/globals/pfLocales.js Regards Fabrice Le 20-03-23 à 13 h 10, Eizens Putnins a écrit : 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 \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 -- Fabrice Durand fdur...@inverse.ca :: +1.514.447.4918 (x135) :: www.inverse.ca Inverse inc. :: Leaders behind SOGo (http://www.sogo.nu) and PacketFence (http://packetfence.org) ___ PacketFence-devel mailing list PacketFence-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/packetfence-devel