If you would have run it you would have seen....Karl Godt wrote:...Have not run hurtigopsættningen though .
Danish language pack
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
- Attachments
-
- dod_mus.png
- bad markup
- (7.43 KiB) Downloaded 365 times
OK : Heres a solution to check markup errors :
1. Create a MARKUPDATABASE like :
2. make a grep -vE pattern :
3. run this inside the directory of the *.po file :
4:result :
P=<b>.*</b>'
P1=<.*b.*>.*..**.*<.*/.*b.*>.*'
<b>Teknisk set</ b> \n"
<b> Advarsel </ b> \n"
P=<u>.*</u>'
P1=<.*u.*>.*..**.*<.*/.*u.*>.*'
P=<i>.*</i>'
P1=<.*i.*>.*..**.*<.*/.*i.*>.*'
1. Create a MARKUPDATABASE like :
Code: Select all
MPDB="<b>.*</b>
<u>.*</u>
<i>.*</i>
"
Code: Select all
MPDBNOT=`echo "$MPDB" |tr -d '[[:blank:]]' |tr '\n' '|' |sed 's%^|*%%;s%|*$%%'`
Code: Select all
while read P; do
echo "P=$P'"
[ "$P" ] || continue;
#P1=`echo "$P" | sed 's%\(.\)%\.\*\1\.\*%g'`; ##doesn't work for me
P1=`echo "$P" | sed 's%\(.\)%\1\.\*%g'`;
echo "P1=$P1'"
grep -o "$P1" *.po | grep -v "$P" | grep -vE "$MPDBNOT";
done<<EOI
$(echo "$MPDB")
EOI
P=<b>.*</b>'
P1=<.*b.*>.*..**.*<.*/.*b.*>.*'
<b>Teknisk set</ b> \n"
<b> Advarsel </ b> \n"
P=<u>.*</u>'
P1=<.*u.*>.*..**.*<.*/.*u.*>.*'
P=<i>.*</i>'
P1=<.*i.*>.*..**.*<.*/.*i.*>.*'
Hi again
Thank you for pinpointing problems in the markup.
With your help I eventually managed to make the quicksetup.mo work
I tried to translate the screeny.mo file - and I was VERY carefull not to make the same mistakes this time. - Even so it won't compile into a mo file and copy itself into the locale dir....
I've attached a zipfile with po, pot, a write log and a text file...
I don't understand why it shouln't work - as I have been *VERY* carefull this time ....
Cheers Måns Mårtensson
Thank you for pinpointing problems in the markup.
With your help I eventually managed to make the quicksetup.mo work
I tried to translate the screeny.mo file - and I was VERY carefull not to make the same mistakes this time. - Even so it won't compile into a mo file and copy itself into the locale dir....
I've attached a zipfile with po, pot, a write log and a text file...
I don't understand why it shouln't work - as I have been *VERY* carefull this time ....
Cheers Måns Mårtensson
- Attachments
-
- screenyproblems.zip
- po, pot, a write log and a text file...
- (5.33 KiB) Downloaded 530 times
-
- capture21980.png
- No success
- (12.06 KiB) Downloaded 427 times
-
- capture20637.png
- Success :-)
- (35.86 KiB) Downloaded 515 times
Pet with danish Abiword strings and QuickSetup
Hi again
I've added a translation of AbiWord provided by my friend Morten (mjjzf) and made a change to the system.profile file - now it saves to word format as default...
QuickSetup is finally in place - thanks to you
langpack_da-20130409.pet
Cheers Måns Mårtensson
I've added a translation of AbiWord provided by my friend Morten (mjjzf) and made a change to the system.profile file - now it saves to word format as default...
QuickSetup is finally in place - thanks to you
langpack_da-20130409.pet
Cheers Måns Mårtensson
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
Danish language pack
screeny.po is enoughmaans wrote:...I've attached a zipfile with po, pot, a write log and a text file...
# msgfmt screeny.po
screeny.po:39:3: invalid multibyte sequence
screeny.po:39:4: invalid multibyte sequence
screeny.po:40:4: invalid multibyte sequence
screeny.po:40:5: invalid multibyte sequence
screeny.po:40:41: invalid multibyte sequence
screeny.po:40:42: invalid multibyte sequence
screeny.po:41:3: invalid multibyte sequence
screeny.po:41:4: invalid multibyte sequence
screeny.po:41:51: invalid multibyte sequence
screeny.po:41:52: invalid multibyte sequence
screeny.po:42:7: invalid multibyte sequence
screeny.po:42:8: invalid multibyte sequence
screeny.po:45:10: invalid multibyte sequence
screeny.po:45:11: invalid multibyte sequence
screeny.po:45:17: invalid multibyte sequence
screeny.po:45:18: invalid multibyte sequence
screeny.po:45:26: invalid multibyte sequence
screeny.po:45:27: invalid multibyte sequence
screeny.po:45:70: invalid multibyte sequence
screeny.po:45:71: invalid multibyte sequence
msgfmt: too many errors, aborting
#
"Content-Type: text/plain; charset=ASCII\n"
We use UTF-8
changed to UTF-8
and
compiled without error# msgfmt screeny.po
#
I really should make momanager manage those faults....
Code: Select all
loop until mo file is created
let user edit po file
if editor closed then msgfmt po -o mo
if error continue
...but maybe Karl is hurtiger
I dont know : My simple "./configure" gettext msgfmt compiles maans ascii .po without problems :
So Puppy gettext might be compiled with --disable-øl --without-beer --without--aquavit --enable-grumpy --follow-ubuntu --force-utf8 --giveus-herring ??bash-3.2# /usr/local/bin/msgfmt screeny.po
bash-3.2#
OK hurtigloopen :
Code: Select all
read -p "/Path/To/The/Program.po : " programpo
echo "$programpo"
[ "$programpo" ] || { echo "Need filename.";exit 1; }
[ -e "$programpo" ] || { echo "'$programpo' does not exist. Not enough beer intus?";exit 1; }
[ -f "$programpo" ] || { echo "'$programpo' is not a regular file. Sorry need more beer"'!';exit 1; }
[ "${programpo##*\.}" = 'po' ] || { echo "'$programpo' is not a .po file. Fill up the fridge maybe?"'!';exit 1; }
echo "Checking '$programpo' for html errors .."
MPDB="<b>.*</b>
<u>.*</u>
<i>.*</i>
"
MPDBNOT=`echo "$MPDB" |tr -d '[[:blank:]]' |tr '\n' '|' |sed 's%^|*%%;s%|*$%%'`
edit_html_func(){
echo -e "\\033[0;39m";
sleep 3s
defaulttexteditor "$programpo"
}
check_html_errors(){
while [ "$RETVAL" != 0 ] ; do
while read P; do
echo "P=$P'"
[ "$P" ] || continue;
RETVAL=0
#P1=`echo "$P" | sed 's%\(.\)%\.\*\1\.\*%g'`; ##doesn't work for me
P1=`echo "$P" | sed 's%\(.\)%\1\.\*%g'`;
echo "P1=$P1'"
echo -e "\\033[1;31m"
grep -n -o "$P1" "$programpo" | grep -v "$P" | grep -vE "$MPDBNOT" && {
edit_html_func
RETVAL=2
break
}
echo -e "\\033[0;39m"
done<<EOI
$(echo "$MPDB")
EOI
[ "$RETVAL" != 2 ] && RETVAL=0
[ "$RETVAL" = 2 ] && continue
RETVAL=0
done
RETVAL=0
}
RETVAL=1
until [ "$RETVAL" = 0 ] ; do
check_html_errors
done
check_msgfmt_compile(){
dirnamepo=`dirname "$programpo"`
basnamepo=`basename "$programpo" .po`
echo -e "\\033[1;31m"
msgfmt --strict -o /tmp/"${basnamepo}.mo" "$programpo"
if [ $? = 0 ] ; then ##alright..
echo -e "\\033[1;32m""Enough liquor intus"'!'"Well done"'!'"\\033[0;39m"
cp --remove-destination /tmp/"${basnamepo}.mo" "$dirnamepo"
RETVAL1=0
else
echo "Urgs... Something went wrongodongo .. Please edit '$programpo'"
edit_html_func
RETVAL1=1
fi
}
RETVAL1=1
until [ "$RETVAL1" = 0 ] ; do
check_msgfmt_compile
done
echo "S0: Session completed. Have a nice day"'!'
exit $RETVAL1
Hi Karl & L18L
I appreciate your help very much
I just needed to know that I should replace the text-content type to UTF-8 to make it work!
I've updated the langpack_da-20130409.pet with a translated Screeny script.
Before I did that - I made a quick remaster where I replaced the initrd file with one that had been translated by lang2initrd (usr/sbin) - and I tried to make it startup with danish as default.
i copied profile, codemap and fontmap from /etc in the remaster process - but I didn't know how to make it choose the right timezone as default....
Would you happen to know what file I should copy/edit to set Europe/Copenhagen as default?
I also need to translate the big puppydialog which starts up after the quicksetup - however I don't know what it is called and therefore I can't find it in the loong list of translatable scripts.
Do you happen to know what it is called?
Last question in this post:
My remaster shows a save-icon on the destop even if it's run in live-mode - and it's not translated - as it wasn't present in the destop-strings file...
1) It shouldn't be there in the first place
2) When there *is* a savefile it should show up - and should be translated to ("gem")...
Sorry if I'm asking too much in one post, however you both seem to be very experienced with Puppy and I guess you can answer these questions without too much effort?!
precise_da-5.4.3.iso (ca. 160 Mb) md5sum: md5sum:
I appreciate your help very much
I just needed to know that I should replace the text-content type to UTF-8 to make it work!
I've updated the langpack_da-20130409.pet with a translated Screeny script.
Before I did that - I made a quick remaster where I replaced the initrd file with one that had been translated by lang2initrd (usr/sbin) - and I tried to make it startup with danish as default.
i copied profile, codemap and fontmap from /etc in the remaster process - but I didn't know how to make it choose the right timezone as default....
Would you happen to know what file I should copy/edit to set Europe/Copenhagen as default?
I also need to translate the big puppydialog which starts up after the quicksetup - however I don't know what it is called and therefore I can't find it in the loong list of translatable scripts.
Do you happen to know what it is called?
Last question in this post:
My remaster shows a save-icon on the destop even if it's run in live-mode - and it's not translated - as it wasn't present in the destop-strings file...
1) It shouldn't be there in the first place
2) When there *is* a savefile it should show up - and should be translated to ("gem")...
Sorry if I'm asking too much in one post, however you both seem to be very experienced with Puppy and I guess you can answer these questions without too much effort?!
precise_da-5.4.3.iso (ca. 160 Mb) md5sum:
Code: Select all
e6cee2ff89747d577cfdffa653dee24a
Code: Select all
e6cee2ff89747d577cfdffa653dee24a
- Attachments
-
- capture18750.png
- Save-icon in live-mode - Why?
- (53.5 KiB) Downloaded 360 times
-
- capture13229.png
- What is this dialog called??
- (64.71 KiB) Downloaded 363 times
-
- capture12275.png
- wrong timezone as default...
- (30.48 KiB) Downloaded 356 times
Last edited by maans on Wed 10 Apr 2013, 13:10, edited 1 time in total.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
startup with your language as default.
I suggestmaans wrote:...startup with danish as default.
i copied profile, codemap and fontmap from /etc in the remaster process - but I didn't know how to make it choose the right timezone as default....
Would you happen to know what file I should copy/edit to set Europe/Copenhagen as default?...
/etc/clock
and
/etc/localtime
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
/usr/sbin/welcome1stbootmaans wrote:...I also need to translate the big puppydialog which starts up after the quicksetup - however I don't know what it is called and therefore I can't find it in the loong list of translatable scripts.
Do you happen to know what it is called?...
... and don't forget to create a danish menu2png
and put it into /usr/share/doc/help/da/
- Attachments
-
- menu2.png
- /usr/share/doc/help/de/menu2.png
- (1.31 KiB) Downloaded 330 times
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
save icon
maans wrote:Last question in this post:
My remaster shows a save-icon on the destop even if it's run in live-mode - and it's not translated - as it wasn't present in the destop-strings file...
1) It shouldn't be there in the first place
2) When there *is* a savefile it should show up - and should be translated to ("gem")...
Sorry if I'm asking too much in one post, however you both seem to be very experienced with Puppy and I guess you can answer these questions without too much effort?!
Don't worry.
Karl is very much more experienced than me with scripting and compiling.
And my experience with live-mode is zero.
I only know /etc/rc.d/PUPMODE
My PUPMODE is 12.
I have never seen that icon.
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
momanager
please test new momanager
http://murga-linux.com/puppy/viewtopic. ... h&id=66493
Save as /usr/sbin/momanager
http://murga-linux.com/puppy/viewtopic. ... h&id=66493
Save as /usr/sbin/momanager
The icon is created by /etc/rc.d/rc.sysinit :
Live PUPMODE number is 5 .
I am wondering how it managed to show that way . Maybe you followed the advise of L18L to use a save-file but on USB drive and your PUPMODE was 13 that time .
PUPMODE number 12 is for frugal on normal internal HDD .
That differs in the way /tmp directory is managed :
In 13 /tmp is a mount point with tmpfs filesystem in ram
and in 12 /tmp is a folder inside the save-file.
Remaster is really tricky if it involves /etc folder and /root like it does in these cases .
I remasterd a lot in the end of the year 2010 and a lot because everytime there had been things missing .
So I am not "The Expert" when it comes to remaster but I know some hidden files that should be left out ( ie /etc/.XLOADED ) .
Thats it for now. Had a day off today
That code alters the PuppyPin file .############ MISC DESKTOP STUFF ##################
[ .. ]Code: Select all
#save button on desktop when booted from flash drive... if [ $PUPMODE -eq 3 -o $PUPMODE -eq 7 -o $PUPMODE -eq 13 ];then #pup_rw is tmpfs. if [ "`cat /root/Choices/ROX-Filer/PuppyPin | grep "save2flash"`" = "" ];then echo '<icon x="768" y="128" label="save">/usr/sbin/save2flash</icon>' >> /root/Choices/ROX-Filer/PuppyPin cat /root/Choices/ROX-Filer/PuppyPin | grep -v '/pinboard' > /tmp/PuppyPin-CPY sync cp -f /tmp/PuppyPin-CPY /root/Choices/ROX-Filer/PuppyPin echo '</pinboard>' >> /root/Choices/ROX-Filer/PuppyPin fi fi
Live PUPMODE number is 5 .
I am wondering how it managed to show that way . Maybe you followed the advise of L18L to use a save-file but on USB drive and your PUPMODE was 13 that time .
PUPMODE number 12 is for frugal on normal internal HDD .
That differs in the way /tmp directory is managed :
In 13 /tmp is a mount point with tmpfs filesystem in ram
and in 12 /tmp is a folder inside the save-file.
Remaster is really tricky if it involves /etc folder and /root like it does in these cases .
I remasterd a lot in the end of the year 2010 and a lot because everytime there had been things missing .
So I am not "The Expert" when it comes to remaster but I know some hidden files that should be left out ( ie /etc/.XLOADED ) .
Thats it for now. Had a day off today
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
save icon on desktop
I see it now in your precise_damaans wrote:...My remaster shows a save-icon on the destop even if it's run in live-mode - and it's not translated - as it wasn't present in the destop-strings file...
as for translation:
try to add it to /usr/share/sss/desk_strings/desk_strings.da
under [_root_Choices_ROX-Filer_PuppyPin]:
s%"save"%"gem"%
Hope that helps
Hi Karl
I'm really impressed that you found a possible reason why this happened!
Thanks a lot
Cheers Måns Mårtensson
Exactly what i did!Karl Godt wrote:Maybe you followed the advise of L18L to use a save-file but on USB drive and your PUPMODE was 13 that time .
PUPMODE number 12 is for frugal on normal internal HDD .
That differs in the way /tmp directory is managed :
In 13 /tmp is a mount point with tmpfs filesystem in ram
and in 12 /tmp is a folder inside the save-file.
I'm really impressed that you found a possible reason why this happened!
Thanks a lot
Cheers Måns Mårtensson
Re: save icon on desktop
Hi L18L
Thanks a lot
Cheers Måns Mårtensson
Great - I'll do that for the next PET version..L18L wrote:add it to /usr/share/sss/desk_strings/desk_strings.da
under [_root_Choices_ROX-Filer_PuppyPin]:
s%"save"%"gem"%
Thanks a lot
Cheers Måns Mårtensson
Hi again
Sorry for spamming this thread with questions for (almost) every script I attempt to translate, however I keep running into trouble.
This time it's the shutdownconfig which is the problem.
If it's not too much of a hazzle could you please look into the translation and maybe pinpoint the error(s).... (I think (hope) it's a new type this time...) :
Cheers Måns Mårtensson
Sorry for spamming this thread with questions for (almost) every script I attempt to translate, however I keep running into trouble.
This time it's the shutdownconfig which is the problem.
If it's not too much of a hazzle could you please look into the translation and maybe pinpoint the error(s).... (I think (hope) it's a new type this time...) :
Cheers Måns Mårtensson
- Attachments
-
- shutdownconfig.zip
- po & txt
- (18.95 KiB) Downloaded 589 times
Hi again
I installed L18L's momanager hack:
official (momanager) language packs
It seems that it now will compile a mo file from my script...?!
No error messages..
GREAT - (just have to check if it works in the shutdown process - I guess it does..
THANKS A LOT L18L !!!!!
Cheers Måns Mårtensson
I installed L18L's momanager hack:
official (momanager) language packs
It seems that it now will compile a mo file from my script...?!
No error messages..
GREAT - (just have to check if it works in the shutdown process - I guess it does..
THANKS A LOT L18L !!!!!
Cheers Måns Mårtensson
Re: momanager
Hi L18L
THANKS A LOT
Great to be called a puppian btw - makes me feel welcome. (and "barking up the right tree" - for once) thanks - and woof woof
Cheers Måns Mårtensson
Sorry didn't see this post untill now - however I saw your contribution and it seems that it solves some of the compiling problems all by it self...L18L wrote:please test new momanager
http://murga-linux.com/puppy/viewtopic. ... h&id=66493
Save as /usr/sbin/momanager
THANKS A LOT
Great to be called a puppian btw - makes me feel welcome. (and "barking up the right tree" - for once) thanks - and woof woof
Cheers Måns Mårtensson
Dette gør ikke null, Måns ! That does'nt matter , Maans !
If You use geany text editor, it seems that to go to
Document > Set Encoding > Unicode > Unicode UTF-8 makes these resembling error messages
sh-3.00# msgfmt shutdownconfig.po
shutdownconfig.po:22:10: invalid multibyte sequence
..
shutdownconfig.po:69:31: invalid multibyte sequence
msgfmt: too many errors, aborting
go away .
Now there is still a tiny thing left :
sh-3.00# msgfmt shutdownconfig-utf8.po
shutdownconfig-utf8.po:454: end-of-line within string
msgfmt: found 1 fatal error
which is missing a ' " ' double quote at the end of line 453 :
If You use geany text editor, it seems that to go to
Document > Set Encoding > Unicode > Unicode UTF-8 makes these resembling error messages
sh-3.00# msgfmt shutdownconfig.po
shutdownconfig.po:22:10: invalid multibyte sequence
..
shutdownconfig.po:69:31: invalid multibyte sequence
msgfmt: too many errors, aborting
go away .
Now there is still a tiny thing left :
sh-3.00# msgfmt shutdownconfig-utf8.po
shutdownconfig-utf8.po:454: end-of-line within string
msgfmt: found 1 fatal error
which is missing a ' " ' double quote at the end of line 453 :
old.po wrote:msgid ""
"You can now choose to save the personal session files to a file, named '${DISTRO_FILE_PREFIX}save.2fs'. Your choice will be remembered at next bootup.\n"
"\n"
"NOTE: You cannot choose to save the session to the entire partition ${xPDEV}, as Puppy is installed into a sub-directory '${xPSUBDIR}'. If Puppy had been installed at '/', not in a folder, then you would have the option of saving the session to the entire partition (assuming that the partition does not have any other distro installed in it) which has the advantage of all the free space in the partition available for your session files."
msgstr ""
"Du kan nu vælge at gemme de personlige session-filer til en fil, der hedder '${DISTRO_FILE_PREFIX}save.2fs'. Dit valg vil blive husket ved næste opstart. \n
"\n"
"BEMÆRK:. Du kan ikke vælge at gemme sessionen til hele partitionen $ {xPDEV}, da Puppy er installeret i en under-mappe '${xPSUBDIR}'. Hvis Puppy var blevet installeret i '/' og ikke i en mappe, så ville du have mulighed for at gemme sessionen til hele partition (forudsat, at partitionen ikke har en anden distro installeret på sig), som får udbytte af al den ledige plads på partitionen til dine sessionsfiler. "
newer.po wrote:msgid ""
"You can now choose to save the personal session files to a file, named '${DISTRO_FILE_PREFIX}save.2fs'. Your choice will be remembered at next bootup.\n"
"\n"
"NOTE: You cannot choose to save the session to the entire partition ${xPDEV}, as Puppy is installed into a sub-directory '${xPSUBDIR}'. If Puppy had been installed at '/', not in a folder, then you would have the option of saving the session to the entire partition (assuming that the partition does not have any other distro installed in it) which has the advantage of all the free space in the partition available for your session files."
msgstr ""
"Du kan nu vælge at gemme de personlige session-filer til en fil, der hedder '${DISTRO_FILE_PREFIX}save.2fs'. Dit valg vil blive husket ved næste opstart. \n"
"\n"
"BEMÆRK: Du kan ikke vælge at gemme sessionen til hele partitionen $ {xPDEV}, da Puppy er installeret i en under-mappe '${xPSUBDIR}'. Hvis Puppy var blevet installeret i '/' og ikke i en mappe, så ville du have mulighed for at gemme sessionen til hele partition (forudsat, at partitionen ikke har en anden distro installeret på sig), som får udbytte af al den ledige plads på partitionen til dine sessionsfiler."