Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Sep 2014, 10:25
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Danish language pack
Moderators: Lobster, MU, raffy
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 3 [42 Posts]   Goto page: Previous 1, 2, 3 Next
Author Message
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Tue 09 Apr 2013, 05:42    Post subject:  

Karl Godt wrote:
...Have not run hurtigopsættningen though .
If you would have run it you would have seen....
dod_mus.png
 Description   bad markup
 Filesize   7.43 KB
 Viewed   275 Time(s)

dod_mus.png

Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Tue 09 Apr 2013, 10:58    Post subject:  

OK : Heres a solution to check markup errors :

1. Create a MARKUPDATABASE like :
Code:
MPDB="<b>.*</b>
<u>.*</u>
<i>.*</i>
"

2. make a grep -vE pattern :
Code:
MPDBNOT=`echo "$MPDB" |tr -d '[[:blank:]]' |tr '\n' '|' |sed 's%^|*%%;s%|*$%%'`

3. run this inside the directory of the *.po file :
Code:
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

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.*>.*'
Back to top
View user's profile Send private message Visit poster's website 
maans

Joined: 07 Jan 2010
Posts: 83
Location: Denmark

PostPosted: Tue 09 Apr 2013, 11:28    Post subject:  

Hi again

Thank you for pinpointing problems in the markup.
With your help I eventually managed to make the quicksetup.mo work Very Happy

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.... Sad

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
screenyproblems.zip
Description  po, pot, a write log and a text file...
zip

 Download 
Filename  screenyproblems.zip 
Filesize  5.33 KB 
Downloaded  186 Time(s) 
capture21980.png
 Description   No success
 Filesize   12.06 KB
 Viewed   284 Time(s)

capture21980.png

capture20637.png
 Description   Success :-)
 Filesize   35.86 KB
 Viewed   267 Time(s)

capture20637.png

Back to top
View user's profile Send private message 
maans

Joined: 07 Jan 2010
Posts: 83
Location: Denmark

PostPosted: Tue 09 Apr 2013, 11:46    Post subject: 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 Very Happy Very Happy

langpack_da-20130409.pet

Cheers Måns Mårtensson
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Tue 09 Apr 2013, 13:27    Post subject: Danish language pack
Subject description: screeny
 

maans wrote:
...I've attached a zipfile with po, pot, a write log and a text file...

screeny.po is enough

# 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

Quote:
# msgfmt screeny.po
#
compiled without error Very Happy

I really should make momanager manage those faults....
Code:
loop until mo file is created
  let user edit po file
  if editor closed then msgfmt po -o mo
  if error continue
or so ....


...but maybe Karl is hurtiger Wink
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Tue 09 Apr 2013, 13:54    Post subject:  

I dont know : My simple "./configure" gettext msgfmt compiles maans ascii .po without problems :
Quote:
bash-3.2# /usr/local/bin/msgfmt screeny.po
bash-3.2#

So Puppy gettext might be compiled with --disable-øl --without-beer --without--aquavit --enable-grumpy --follow-ubuntu --force-utf8 --giveus-herring ??
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Tue 09 Apr 2013, 15:50    Post subject:  

OK hurtigloopen :

Code:
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
Back to top
View user's profile Send private message Visit poster's website 
maans

Joined: 07 Jan 2010
Posts: 83
Location: Denmark

PostPosted: Tue 09 Apr 2013, 16:27    Post subject:  

Hi Karl & L18L

I appreciate your help very much Very Happy Very Happy

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?! Cool Very Happy

precise_da-5.4.3.iso (ca. 160 Mb) md5sum:
Code:
e6cee2ff89747d577cfdffa653dee24a
md5sum:
Code:
e6cee2ff89747d577cfdffa653dee24a
capture18750.png
 Description   Save-icon in live-mode - Why?
 Filesize   53.5 KB
 Viewed   227 Time(s)

capture18750.png

capture13229.png
 Description   What is this dialog called??
 Filesize   64.71 KB
 Viewed   230 Time(s)

capture13229.png

capture12275.png
 Description   wrong timezone as default...
 Filesize   30.48 KB
 Viewed   217 Time(s)

capture12275.png


Last edited by maans on Wed 10 Apr 2013, 09:10; edited 1 time in total
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Wed 10 Apr 2013, 05:33    Post subject: startup with your language as default.
Subject description: remaster
 

maans 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?...


I suggest
/etc/clock
and
/etc/localtime
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Wed 10 Apr 2013, 06:03    Post subject:  

maans 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?...

/usr/sbin/welcome1stboot
... and don't forget to create a danish menu2png
and put it into /usr/share/doc/help/da/
menu2.png
 Description   /usr/share/doc/help/de/menu2.png
 Filesize   1.31 KB
 Viewed   194 Time(s)

menu2.png

Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Wed 10 Apr 2013, 07:12    Post subject: 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?! Cool Very Happy

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. Rolling Eyes
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Wed 10 Apr 2013, 12:00    Post subject: momanager
Subject description: extended
 

please test new momanager
http://murga-linux.com/puppy/viewtopic.php?mode=attach&id=66493

Save as /usr/sbin/momanager
Back to top
View user's profile Send private message 
Karl Godt


Joined: 20 Jun 2010
Posts: 3972
Location: Kiel,Germany

PostPosted: Wed 10 Apr 2013, 13:02    Post subject:  

The icon is created by /etc/rc.d/rc.sysinit :
Quote:
############ MISC DESKTOP STUFF ##################
[ .. ]
Code:
#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

That code alters the PuppyPin file .
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 Smile
Back to top
View user's profile Send private message Visit poster's website 
L18L

Joined: 19 Jun 2010
Posts: 2505
Location: Burghaslach, Germany somewhere also known as "Hosla"

PostPosted: Wed 10 Apr 2013, 13:09    Post subject: save icon on desktop  

maans 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...

I see it now in your precise_da Cool
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
Back to top
View user's profile Send private message 
maans

Joined: 07 Jan 2010
Posts: 83
Location: Denmark

PostPosted: Fri 12 Apr 2013, 10:28    Post subject:  

Hi Karl
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.

Exactly what i did!
I'm really impressed that you found a possible reason why this happened!

Thanks a lot Very Happy

Cheers Måns Mårtensson
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 3 [42 Posts]   Goto page: Previous 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1245s ][ Queries: 13 (0.0181s) ][ GZIP on ]