[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Aptitude localized defaults string



  OK, I ran some moderately horrible shell [0] to extract the section
translations from previous versions and place them into
aptitude-defaults.$LANG files.  Should I go ahead and add these to the
Makefile and translate the appropriate string, or leave it up to the
individual translators?

    Thanks,
  Daniel

[0]

  I installed .mo files containing section strings -- a trick in itself
since the last release apparently didn't translate section descriptions! --
into /tmp/aptitude-tmp, created
/tmp/aptitude-tmp2/share/locale/de/LC_MESSAGES, and ran the following
shell (which I include solely for the purposes of documentation and/or
reproduction of what I did; don't read on if you have a weak stomach)





LANGS=$(for x in *.po; do echo ${x%.po}; done)
for lang in $LANGS; do
  cp /tmp/aptitude-tmp/share/locale/$lang/LC_MESSAGES/aptitude.mo /tmp/aptitude-tmp2/share/locale/de/LC_MESSAGES || continue
  (export LC_ALL=de_DE.UTF-8
   cat section-descriptions | while read -r; do
                                 if (echo "$REPLY" | egrep -qv '^[[:space:]]*[^[:space:]]*[[:space:]]*"([^"]*)";$')
				 then echo "$REPLY"
				 else (echo -n "$REPLY" |  sed 's/^\([ \t]*[^ \t]*[ \t]*"\)\([^"]*\)";$/\1/g'
				       TEXTDOMAINDIR=/tmp/aptitude-tmp2/share/locale gettext -e aptitude "$(echo -n "$REPLY" |  sed 's/^[ \t]*[^ \t]*[ \t]*"\([^"]*\)";$/\1/g' | sed "s/''/\"/g")" | sed ':x {N
s/\n/\\n/g
bx
}' | sed "s/\"/''/g"; echo '";')
                                 fi
		              done
  ) > aptitude-defaults.$lang && hg add aptitude-defaults.$lang
done


Reply to: