see:vicmz wrote:On another topic, the attached file contains eight more menu entry files that have translations that can only be fixed by replacing the equivalent files in Woof. This time I made sure there weren't any more of them. No need to rush, they can be included for future releases.
Wary/Racy 5.3RC2
On other words, my experience:
Updates of menu entries (in applications.in)
are made ONLY IF there is no menu entry existing in applications.
I have changed pinstall.sh
and update of menu entries was perfectif [ -d usr/share/applications.in ];then
# for ADESKTOPFILE in `find usr/share/applications.in -mindepth 1 -maxdepth 1 -type f -name '*.desktop' | tr '\n' ' '`
# do
# ABASEDESKTOP="`basename $ADESKTOPFILE`"
# if [ -f usr/share/applications/${ABASEDESKTOP} ];then
# if [ "`grep '^Name\[de\]' usr/share/applications.in/${ABASEDESKTOP}`" != "" ];then
# if [ "`grep '^Name\[de\]' usr/share/applications/${ABASEDESKTOP}`" = "" ];then #L18L
# #aaargh, these accursed back-slashes! ....
# INSERTALINE="`grep '^Name\[de\]' usr/share/applications.in/${ABASEDESKTOP} | sed -e 's%\[%\\\\[%' -e 's%\]%\\\\]%'`"
# sed -i -e "s%^Name=%${INSERTALINE}\\nName=%" usr/share/applications/${ABASEDESKTOP}
# fi
# fi #L18L
# fi
# done
#rm -r -f usr/share/applications.in
#...don't remove it. might be useful for ppm when install future packages.
# copy applications.in in applications
cp -u /usr/share/applications.in/* /usr/share/applications #L18L
fi
------------------------------
edited 20120420
not quite perfect
In the menu there were items of not installed apps
I will have to investigate further
------------------------------
==edited 20120423========================
Found and tested a solution which allows change of translated menu item.
pinstall.sh of langpack_* line 14 ff.:
Code: Select all
if [ -d /usr/share/applications.in ];then
for ADESKTOPFILE in `find /usr/share/applications.in -mindepth 1 -maxdepth 1 -type f -name '*.desktop' | tr '\n' ' '`
do
ABASEDESKTOP="`basename $ADESKTOPFILE`"
#if [ -f usr/share/applications/${ABASEDESKTOP} ];then
#if [ "`grep '^Name\[de\]' usr/share/applications/${ABASEDESKTOP}`" = "" ];then
if [ "`grep '^Name\[de\]' /usr/share/applications.in/${ABASEDESKTOP}`" != "" ];then
#aaargh, these accursed back-slashes! ....
#INSERTALINE="`grep '^Name\[de\]' /usr/share/applications.in/${ABASEDESKTOP} | sed -e 's%\[%\\\\[%' -e 's%\]%\\\\]%'`"
#sed -i -e "s%^Name=%${INSERTALINE}\\nName=%" /usr/share/applications/${ABASEDESKTOP}
#append a line (easier)
INSERTALINE="`grep '^Name\[de\]' /usr/share/applications.in/${ABASEDESKTOP} `"
echo "${INSERTALINE}" >> /usr/share/applications/${ABASEDESKTOP}
fi
#fi
#fi
done
#rm -r -f usr/share/applications.in
#...don't remove it. might be useful for ppm when install future packages.
fi
edit
vicmz,
maybe
Code: Select all
cp -u /usr/share/applications.in/* /usr/share/applications
=====================================
2012-05-03 edited for the record
Tested another solution in langpack_de-20120503.pet
Put this code into pinstall.sh
Code: Select all
#Need to delete all Name[$LANG1]=..... in /usr/share/applications
cd /usr/share/applications
for AFILE in `ls *.desktop` ;do sed -i "/Name\[${LANG1}/d" $AFILE ;done
cd - # thus changes are possible too
edited Names in /usr/share/sss/menu_strings.de
ex:
s%"Restart JWM"%"JWM neustarten"%
s%"Abiwordprocessor"%"Abiwort-TextVA"%
s%"Abiword word processor"%"Abiword Textverarbeitung"%
s%"FFConvert multimedia converter"%"FFConvert Multimedia-Konverter"%
...
and deleted /usr/share/applications.in from langpack
=====================================