QuickLocaleSwitcher for people who have more than 1 langpack

For efforts in internationalising Puppy and solving problems in this area
Message
Author
User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#16 Post by L18L »

build de_DK and da_DE from /usr/share/i18n/locales
.. Ick glööv dat jo
Karl Godt wrote:Did not know that feature . Great 8)
... and I did not know that:

Code: Select all

grep -viE 'posix|translit|i18n|iso|eur|^$' 
:D

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

QuickLocaleSwitcher

#17 Post by L18L »

AppInfo.xml in langpack has to be reorganized to enable multi-lingual use
bi-lingual is OK if one of the two is English

But I want real multi-lingual use.
example trash

Code: Select all

<?xml version="1.0"?>
<AppInfo>
  <Summary>Trash</Summary>
  <Summary xml:lang="ru">Корзина</Summary>
  <Summary xml:lang="ja">ゴミ箱</Summary>
  <Summary xml:lang="zh_CN">回收站</Summary>
  <About>
    <Purpose>Trash Can for Puppy Linux</Purpose>
    <License>GPL: http://www.gnu.org/licenses/gpl.txt</License>
    <Version>0.3.2 - September 04, 2008</Version>
    <Homepage>http://murga-linux.com/puppy/viewtopic.php?t=27310/</Homepage>
  </About>
  <AppMenu>
	<Item option="-look">
	<Label>Look in the Trash</Label>
	<Label xml:lang="ru">По

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

QuickLocaleSwitcher

#18 Post by L18L »

L18L wrote:...Solution,
- fix momanager
#130418 rename AppInfo.xml to AppInfo.xml.in for langpack to enable peaceful co-existences of langpacks for different languages L18L

- fix pinstall.sh
#130420 merge AppInfo.xml.in with AppInfo.xml to enable peaceful coexistence of multiple langpacks

.....coming tomorrow :lol:
Here it is in attached create_langpack_for_multiple_languages.tar.gz
which contains
-momanager
-pinstall_hacks.sh

If you create a langpack after having installed this ( just expand it to / )
then this langpack does not overwrite the AppInfo.xml files
but merge the xml:lang=..

I should create a new langpack_de soon
... and wait for others?
or if you do not have a fast and cheap ( zero cost ) connection
then tell me and I can switch your langpack for multilingual usage .... :wink:
Attachments
create_langpack_for_multiple_languages.tar.gz
expand to /
and create new langpack
which is multi-lingual friendly
(20.85 KiB) Downloaded 780 times

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

QuickLocaleSwitcher

#19 Post by L18L »

L18L wrote:...I should create a new langpack_de soon....
Creation was quickly done.
But upload to ompl.org failed....

Try this one please: [edit] URL changed to official langpack [/edit]
http://distro.ibiblio.org/quirky/pet_pa ... 130528.pet
Last edited by L18L on Sat 08 Jun 2013, 10:31, edited 1 time in total.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

#20 Post by L18L »

Karl Godt wrote:I don't think that da_DE or de_DK exists at this time .
Bonn-Kopenhagener Erklärungen

givt dat nich in inglisch .. Ick glööv dat jo nich !
dat givt in spanisch
vicmz is very busy :lol:

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: QuickLocaleSwitcher

#21 Post by L18L »

L18L wrote:... I can switch your langpack for multilingual usage .... :wink:
Note
though this is in a thread called QuickLocaleSwitcher
these fixes are necessary
if you want to install more than 1 langpack
Attachments
langpack_convert.tar.gz
another ( cosmetic only ) bug fixed
(1.64 KiB) Downloaded 819 times
Last edited by L18L on Thu 25 Apr 2013, 09:11, edited 2 times in total.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

More than 1 langpack

#22 Post by L18L »

Note,
if you want to install more than 1 langpack

1st - change your locale to that lang
2nd - install langpack_lang

I call this a bug and I am working on a solution where you can install langpack for language other than the current locale.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: More than 1 langpack

#23 Post by L18L »

L18L wrote:Note,
if you want to install more than 1 langpack

1st - change your locale to that lang
2nd - install langpack_lang

I call this a bug and I am working on a solution where you can install langpack for language other than the current locale.
Simple fix is:

Code: Select all

#130424 LANG1 from langpack not from actual LANG

LANG1="`cat pet.specs | cut -d'-' -f1 | cut -d'_' -f2`" #130424
or use bug fixed version 2 posts back

Then you can install different langpacks without changing locale before.

[edit] Note
that langpack must contain latest pinstall.sh ( created by latest momanager )
latest pinstall.sh wrote:#121011 L18L requested call to extra hacks script.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

More than 1 langpack: langpack_convert

#24 Post by L18L »

If the langpack does not contain a translation for AppInfo.xml.in
then a very ugly empty line is created in AppInfo.xml

fix:
#130425 skip if translation in AppInfo.xml.in is not for this LANG1 ( from another langpack )

replace
echo "$mySUMMARY"
by
[ "$mySUMMARY" ] || continue #130425
in pinstall_hacks.sh

or use updated langpack_convert.tar.gz 3 posts back

--------------------------
[edit] for the record

Installed several converted langpacks_ .... (fi was a bit tricky)
[quote="head -n 15 /usr/local/apps/Connect/AppInfo.xml"]<?xml version="1.0"?>
<AppInfo>
<Summary>Connect to the Internet/network</Summary>
<Summary xml:lang="fi">Yhdistä internettiin/lähiverkkoon</Summary>
<Summary xml:lang="da">Opret forbindelse tl internettet/netværket</Summary>
<Summary xml:lang="es">Conectar a Internet/red</Summary>
<Summary xml:lang="el">Σ

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

QuickLocaleSwitcher

#25 Post by L18L »

Version 0.2 (and a picture) at first post.

After switch of language now programms launched from menu
are in the switched language.

All programms?

Not all. abiword has its own method of translating its GUI.
But abiword can be successfully launched from desktop icon.

Seamonkey. There should be an addon QuickLocaleSwitcher I think.


[edit] Note,
included script fixmenus does fix jwm only if jwm is the actual window manager.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

QuickLocaleSwitcher

#26 Post by L18L »

GUI improved

there are messages

- if just 2 locales active (no choice, just toggle)
- if just 1 (English) active , see picture on post 1.

Languages other than Russian or German?

Should work if langpack is made with AppInfo.xml.in
see http://bkhome.org/blog2/?viewDetailed=00260

download quicklocaleswitch.pet from initial post.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

More than 1 langpack

#27 Post by L18L »

L18L wrote:... (not yet perfect:--->doc.htm :cry: )
I had wanted and continue wanting all doc files to not overwrite the original English files.

I had these files in:
/usr/share/doc/language-template/usr/share/doc/help/de/

But now I have found the way how to do it in momanager using
/usr/share/sss/doc_strings

Code: Select all

#THERE IS NOTHING TO EDIT IN THIS FILE -- MoManager reads this file and does all that is needed.
#I REPEAT, PLEASE DO NOT CHANGE THIS FILE, use MoManager.
But I did 8)
/usr/share/sss/doc_strings/doc_strings wrote:[_usr_share_doc_HOWTO-fattenpuppy.htm]
#when the translation file is same name as the en file, then former replaces latter.
#but I change the translation rule
#SSS_TRANSLATION_RULE='/usr/share/doc/HOWTO-fattenpuppy.htm'

SSS_TRANSLATION_RULE='/usr/share/doc/help/SSSLANG1MARKER/HOWTO-fattenpuppy.htm'
SSS_HANDLER_EDITOR='defaulthtmleditor'
SSS_HANDLER_VIEWER='basichtmlviewer'
Thus momanager has put /usr/share/doce/help/<language>/HOWTO-fattenpuppy.htm into the langpack :D

You should change
<html>
to
<html lang="<your language code>">
and
charset="iso-8859-1"
to
charset="UTF-8"

until momanager will do this automatically :roll: :?:

Feedback appreciated

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

QuickLocaleSwitcher for people who have more than 1 langpack

#28 Post by L18L »

Version 0.4 improved
check for dependencies
some bugs fixed

see 1st post of this thread

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

QuickLocaleSwitcher for people who have more than 1 langpack

#29 Post by L18L »

There is something better now

no yad needed
new button in jwm tray

http://www.murga-linux.com/puppy/viewtopic.php?p=769153

Post Reply