From e7ec1efdc843e3ecb88423dfd83c4470d289da72 Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 10 Jun 2022 10:36:56 +0100 Subject: [PATCH 1/5] Remove unused, no-op create_pot_file.sh 614f6573e71d6e06d8888c0957a64a0c7fd8921d made this "a no-op script, for now", in September 2006. It seems safe to assume, 16 years later, that if it is needed it can be recovered from the Git history. --- src/po/create_pot_file.sh | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100755 src/po/create_pot_file.sh diff --git a/src/po/create_pot_file.sh b/src/po/create_pot_file.sh deleted file mode 100755 index cc5e19201..000000000 --- a/src/po/create_pot_file.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -# script to create a correct *.pot file -# -# the problem is that the i18n() functions can be of -# one argument: i18n("translatable string") -# or of two arguments: i18n("context", "translatable string") -# this script rewrite the source files changing that second form -# into i18n("_: context\ntranslatable string") that xgettext can grok -# and produce the same kind of *.pot as expected by KDE - -exit - -rm -f POTFILES.new -(for i in `grep -v "encoding" POTFILES.in | sed 's:^:../:'` -do - j="${i}_" - cat ${i} | \ - sed 's|\(i18n[^(]*([^"]*"\)\([^"]*\)"[^")]*,[^")]*"|\1_: \2\\n|' > ${j} - echo ${j} | sed 's:^...::' >> POTFILES.new -done ) - -intltool-update --pot && mv -f tuxpaint.pot tuxpaint_tmp.pot -/usr/bin/xgettext --from-code=UTF-8 -o tuxpaint_tmp_C.pot --directory=.. \ - --add-comments --keyword=I_ --keyword=i18n \ - --keyword=I18N_NOOP \ - --language=C \ - --files-from=./POTFILES.new -msgcat --use-first tuxpaint_tmp.pot tuxpaint_tmp_C.pot > tuxpaint.pot - -( cd .. ; rm -f `cat po/POTFILES.new` ) -rm -f POTFILES.new tuxpaint_tmp*.pot - From 31412499690cc3c4c8729d7100e241a346b5741e Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 10 Jun 2022 10:36:50 +0100 Subject: [PATCH 2/5] Remove intltool dependency Since gettext 0.19, gettext itself has been able to extract strings from and merge translations to .desktop files. As a result, there is no need to use intltool. More details are available on https://wiki.gnome.org/MigratingFromIntltoolToGettext, though that page assumes a project using Autotools, which this project does not. One advantage of using xgettext rather than intltool is that there is no need to prefix translatable keys in the .desktop.in file with _. This patch adjusts tuxpaint.desktop.in accordingly, which makes the input file itself a valid desktop file. The LINGUAS file contains the list of supported languages. This could in principle be generated automatically from one of the other places in the source tree that has a manually-maintained list of languages; but in my experience it is generally maintained by hand and checked into the source tree. POTFILES.in.in must be updated to remove the intltool-specific file encoding annotation; instead this is passed to xgettext. Finally, update-po.sh is rewritten to invoke xgettext and msgfmt rather than intltool commands. The mangling of POTFILES.in.in to prefix all filenames with '../' is only necessary to minimize the churn when updating the .pot and .po files, to simplify review of this change. The alternative is to pass --directory=.. to xgettext. This would cause all .po files to be updated as follows when regenerated: #. Response to Black (0, 0, 0) color selected -#: ../colors.h:86 +#: colors.h:86 msgid "Black!" msgstr "Noir !" --- src/configure.in | 6 -- src/po/LINGUAS | 129 ++++++++++++++++++++++++++++++++++++++++ src/po/POTFILES.in.in | 1 - src/po/update-po.sh | 23 ++++--- src/tuxpaint.desktop.in | 6 +- 5 files changed, 148 insertions(+), 17 deletions(-) delete mode 100644 src/configure.in create mode 100644 src/po/LINGUAS diff --git a/src/configure.in b/src/configure.in deleted file mode 100644 index 98eb6206d..000000000 --- a/src/configure.in +++ /dev/null @@ -1,6 +0,0 @@ -# fake file, so that intltools work -# $Id$ - -AM_INIT_AUTOMAKE(tuxpaint, 0.9.14) -AM_PROG_XML_I18N_TOOLS - diff --git a/src/po/LINGUAS b/src/po/LINGUAS new file mode 100644 index 000000000..6a01e3aee --- /dev/null +++ b/src/po/LINGUAS @@ -0,0 +1,129 @@ +ach +af +ak +am +an +ar +as +ast +az +be +bg +bm +bn +bo +br +brx +bs +ca +ca@valencia +cgg +cs +cy +da +de +doi +el +en_AU +en_CA +en_GB +en_ZA +eo +es_MX +es +et +eu +fa +ff +fi +fo +fr +ga +gd +gl +gos +gu +he +hi +hr +hu +hy +id +is +it +iu +ja +kab +ka +km +kn +kok +kok@roman +ko +ks@devanagari +ks +ku +lb +lg +lt +lv +mai +mk +ml +mni@meiteimayek +mni +mn +mr +ms +nb +ne +nl +nn +nr +nso +oc +oj +or +pa +pl +pt_BR +pt +ro +ru +rw +sa +sat@olchiki +sat +sc +sd@devanagari +sd +shs +si +sk +sl +son +sq +sr@latin +sr +su +sv +sw +ta +te +th +tlh +tl +tr +tw +uk +ur +vec +ve +vi +wa +wo +xh +zam +zh_CN +zh_TW +zu diff --git a/src/po/POTFILES.in.in b/src/po/POTFILES.in.in index 7b20a2945..ace0b33cc 100644 --- a/src/po/POTFILES.in.in +++ b/src/po/POTFILES.in.in @@ -1,4 +1,3 @@ -[encoding: UTF-8] colors.h dirwalk.c fill_tools.h diff --git a/src/po/update-po.sh b/src/po/update-po.sh index 15a70aba9..4d2e04a2b 100755 --- a/src/po/update-po.sh +++ b/src/po/update-po.sh @@ -1,14 +1,23 @@ #!/bin/sh +cd $(dirname "$0") -cp POTFILES.in.in POTFILES.in -ls ../../magic/src/*.c | cut -b 4- >> POTFILES.in +sed -e 's/^/..\//' POTFILES.in.in > POTFILES.in +ls ../../magic/src/*.c >> POTFILES.in + +xgettext \ + --package-name=tuxpaint \ + --files-from=POTFILES.in \ + --from-code=UTF-8 \ + --keyword=gettext_noop \ + --add-comments \ + --output=tuxpaint.pot -intltool-update --pot -msguniq tuxpaint.pot > temp.tmp && mv -f temp.tmp tuxpaint.pot for i in *.po ; do echo $i msgmerge --update --previous --backup=none $i tuxpaint.pot done -cd .. -intltool-merge -d -u po tuxpaint.desktop.in tuxpaint.desktop -cd po + +msgfmt --desktop \ + -d . \ + --template ../tuxpaint.desktop.in \ + --output-file ../tuxpaint.desktop diff --git a/src/tuxpaint.desktop.in b/src/tuxpaint.desktop.in index ad5ffd87a..12b1d1392 100644 --- a/src/tuxpaint.desktop.in +++ b/src/tuxpaint.desktop.in @@ -1,9 +1,9 @@ [Desktop Entry] -_Name=Tux Paint +Name=Tux Paint Type=Application Exec=tuxpaint Icon=tuxpaint Terminal=false Categories=Education;Art; -_GenericName=Drawing program -_Comment=A drawing program for children. +GenericName=Drawing program +Comment=A drawing program for children. From b4aa697474e1cc60b6faac80297cc66a602f54fd Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 10 Jun 2022 10:36:48 +0100 Subject: [PATCH 3/5] Merge desktop file at build time Previously, both the .desktop.in template and the final .desktop file were checked into source control. While in some ways convenient, the manual step of updating it may be forgotten after updating a translation or adjusting the template. It also potentially introduces confusion as to which file to modify. Instead, generate the .desktop file at build time. Since this is now done using msgfmt rather than intltool, there is no additional dependency beyond gettext, which is already used at build time to compile .po files to .mo files. --- .gitignore | 1 + Makefile | 9 +- src/po/update-po.sh | 5 - src/tuxpaint.desktop | 372 ------------------------------------------- 4 files changed, 6 insertions(+), 381 deletions(-) delete mode 100644 src/tuxpaint.desktop diff --git a/.gitignore b/.gitignore index 2685d171d..50a434c60 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ TuxPaint.dmg .DS_Store *.thumbs src/po/POTFILES.in +src/tuxpaint.desktop diff --git a/Makefile b/Makefile index 1946d21ca..66227bb82 100644 --- a/Makefile +++ b/Makefile @@ -529,6 +529,9 @@ endif $(MOFILES): trans/%.mo: src/po/%.po msgfmt -o $@ $< +%.desktop: %.desktop.in $(POTFILES) + msgfmt --desktop -d src/po --template $< -o $@ + .PHONY: translations ifeq "$(shell msgfmt -h)" "" translations: trans @@ -538,7 +541,7 @@ translations: trans @echo "Install gettext to run Tux Paint in non-U.S. English modes." @echo "--------------------------------------------------------------" else -translations: trans $(MOFILES) +translations: trans $(MOFILES) src/tuxpaint.desktop endif trans: @@ -923,13 +926,11 @@ install-nokia770: fi @-find $(DESTDIR)$(NOKIA770_PREFIX) -name CVS -type d -exec rm -rf \{\} \; - - # Install a launcher icon in the Linux desktop environment's (freedesktop.org) menus... # FIXME: No way to install SVG icons using `xdg-icon-resource` # (see https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/790449) .PHONY: install-xdg -install-xdg: +install-xdg: src/tuxpaint.desktop @echo @echo "...Installing launcher icon into desktop environment..." @if [ "x$(shell which xdg-icon-resource install)" != "x" ]; then \ diff --git a/src/po/update-po.sh b/src/po/update-po.sh index 4d2e04a2b..50fcac6c9 100755 --- a/src/po/update-po.sh +++ b/src/po/update-po.sh @@ -16,8 +16,3 @@ for i in *.po ; do echo $i msgmerge --update --previous --backup=none $i tuxpaint.pot done - -msgfmt --desktop \ - -d . \ - --template ../tuxpaint.desktop.in \ - --output-file ../tuxpaint.desktop diff --git a/src/tuxpaint.desktop b/src/tuxpaint.desktop deleted file mode 100644 index 344ca2f95..000000000 --- a/src/tuxpaint.desktop +++ /dev/null @@ -1,372 +0,0 @@ -[Desktop Entry] -Name=Tux Paint -Name[ach]=Tux Paint -Name[af]=Tux Verf -Name[ak]=Tux Paint -Name[am]=ተክስ መሳያ -Name[an]=Tux Paint -Name[ar]=رسم توكس -Name[as]=টাক্স পেইন্টটো -Name[ast]=Tux Paint -Name[az]=Tuks ilə şəkil çək. -Name[be]=Малюй разам з Tux! -Name[bg]=Рисуване с Тъкс -Name[bm]=Pɛntiri Tukisi . -Name[bn]=টাক্স পেন্ট -Name[br]=Tux Paint -Name[brx]=टाक्सपेन्ट -Name[bs]=Tux Paint -Name[ca]=Tux Paint -Name[ca@valencia]=Tux Paint -Name[cgg]=Tux Paint -Name[cs]=Tux Paint -Name[cy]=Tux Paint -Name[da]=Tux Paint -Name[de]=Tux Paint -Name[doi]=टक्स पेंट -Name[el]=Tux Paint -Name[en_AU]=Tux Paint -Name[en_CA]=Tux Paint -Name[en_GB]=Tux Paint -Name[en_ZA]=Tux Paint -Name[eo]=Tux Desegnilo -Name[es]=Tux Paint -Name[es_MX]=Tux Paint -Name[et]=Joonistame koos Tuksiga! -Name[eu]=Tux Paint -Name[fa]=تاکس پینت -Name[ff]=Tux Paint -Name[fi]=Tux Taiteilija -Name[fo]=Tux Paint -Name[fr]=Tux Paint -Name[ga]=Tux Paint -Name[gd]=Tux Paint -Name[gl]=Tux Paint -Name[gu]=ટક્સ પેન્ટ -Name[he]=Tux Paint -Name[hi]=Tux Paint -Name[hr]=Tux Bojanje -Name[hu]=Tux Paint -Name[hy]=Նկարիչ Տուքսը -Name[id]=Tux Paint -Name[is]=Tux Paint -Name[it]=Tux Paint -Name[iu]=Tux Paint -Name[ja]=タックスペイント -Name[ka]=თხუპნია! -Name[kab]=Tux Paint -Name[km]=Tux Paint -Name[kn]=ಟಕ್ಸ್ ಪೇಂಟ್ -Name[ko]=턱스페인트 -Name[kok]=टूक्स रंग -Name[kok@roman]= tux rong -Name[ks]=ٹَکس پینٹ -Name[ks@devanagari]=टकोस पिंट -Name[ku]=Tux Paint -Name[lb]=Tux Paint -Name[lg]=Tux Paint -Name[lt]=Tux Paint -Name[lv]=Tux Zīmēšana -Name[mai]=टक्स पेंट -Name[mk]=Tux Боенка -Name[ml]=ടക്സ് പെയിന്റ് -Name[mni]=তক্স পেইন্ত -Name[mni@meiteimayek]=ꯇꯛꯁ ꯄꯦꯏꯟꯠ -Name[mr]=टुक्स हे चित्रकाराचे आधुनिक उपकरण -Name[ms]=Tux Paint -Name[nb]=Tux Paint -Name[ne]=टक्स पेन्ट -Name[nl]=Tux Paint -Name[nn]=Tux Paint -Name[nr]=ITux Pende -Name[nso]=Tux Paint -Name[oc]=Tux Paint -Name[or]=ଟକ୍ସ ପେଣ୍ଟ -Name[pa]=ਟਕਸ ਪੇਂਟ -Name[pl]=Tux Paint -Name[pt]=Tux Paint -Name[pt_BR]=Tux Paint -Name[ro]=Pictează cu Tux -Name[ru]=Рисуй вместе с Tux! -Name[sa]=टक्स् पेयिण्ट् -Name[sat]=टक्स रोङ पेरेच् -Name[sat@olchiki]=ᱴᱠᱥ ᱨᱚᱝ ᱯᱮᱨᱮᱪ -Name[sc]=Tux Paint -Name[sd]=ٽڪس رنگ -Name[sd@devanagari]=टक्स रंगु -Name[si]=Tux Paint -Name[sk]=Kreslenie s Tuxom -Name[sl]=Slikar Tux -Name[son]=Tux Paint -Name[sq]=Tux Paint -Name[sr]=Такс Цртање -Name[sr@latin]=Taks Crtanje -Name[su]=Tux Paint -Name[sv]=Rita med Tux -Name[sw]=Koti ya Rangi -Name[ta]=டக்சு பெயின்ட் -Name[te]=టక్స పెయింట్ -Name[th]=ทักซ์สอนวาดรูป -Name[tr]=Tux Boyama -Name[tw]=Tux Paint -Name[uk]=Малюй разом з Tux! -Name[ur]=ٹكس پینٹ -Name[ve]=Tux Paint -Name[vec]=Tux Paint -Name[vi]=Tux Sơn -Name[wa]=Tux Paint -Name[wo]=Tux Paint -Name[xh]=Ipeyinti yeTux -Name[zam]=Tux Paint -Name[zh_CN]=Tux Paint -Name[zh_TW]=企鵝小畫家 -Name[zu]=i-Tux Paint -Type=Application -Exec=tuxpaint -Icon=tuxpaint -Terminal=false -Categories=Education;Art; -GenericName=Drawing program -GenericName[ach]=Purugram me goc -GenericName[af]=Tekenprogram -GenericName[ak]=Drɔyɛ nhyehyɛyɛ -GenericName[am]=የመሳያ ፍርግም። -GenericName[an]=Un programa de dibuixo -GenericName[ar]=برنامج رسم -GenericName[as]=ড্ৰয়িংৰ কাৰ্য্যসূচীটো -GenericName[ast]=Programa de dibuxu -GenericName[az]=Rəsm proqramı -GenericName[be]=Праграма для малявання -GenericName[bg]=Програма за рисуване -GenericName[bm]=ɲɛgɛn taabolo. -GenericName[bn]=অঙ্কন প্রোগ্রাম -GenericName[br]=Meziant tresañ -GenericName[brx]=आखिनाय हाबाफारि -GenericName[bs]=Program za crtanje -GenericName[ca]=Programa de dibuix -GenericName[ca@valencia]=Programa de dibuix -GenericName[cgg]=Akeire kukuteera ebishushani -GenericName[cs]=Kreslicí program -GenericName[cy]=Rhaglen lunio -GenericName[da]=Tegneprogram -GenericName[de]=Malprogramm -GenericName[doi]=चित्रकारी प्रोग्राम -GenericName[el]=Πρόγραμμα ζωγραφικής -GenericName[en_AU]=Drawing program -GenericName[en_CA]=Drawing program -GenericName[en_GB]=Drawing program -GenericName[en_ZA]=Drawing program -GenericName[eo]=Desegnoprogramo -GenericName[es]=Un programa de dibujo. -GenericName[es_MX]=Programa de dibujo -GenericName[et]=Joonistusprogramm -GenericName[eu]=Marrazketa programa -GenericName[fa]=برنامه نقاشی -GenericName[ff]=Topirde natgol -GenericName[fi]=Maalausohjelma -GenericName[fo]=Tekniforrit -GenericName[fr]=Programme de dessin -GenericName[ga]=Clár líníochta -GenericName[gd]=Prògram peantaidh -GenericName[gl]=Programa de debuxo -GenericName[gu]=ચિત્ર કાર્યક્રમ -GenericName[he]=תוכנת ציור -GenericName[hi]=ड्राइंग कार्यक्रम -GenericName[hr]=Program za crtanje -GenericName[hu]=Rajzolóprogram -GenericName[hy]=Նկարչական ծրագիր -GenericName[id]=Program gambar -GenericName[is]=Teikniforrit -GenericName[it]=Programma di disegno -GenericName[iu]=ᐊᓪᓚᖑᐊᕈᑎ -GenericName[ja]=お絵かきプログラム -GenericName[ka]=სახატავი პროგრამა -GenericName[kab]=Ahil n usuneɣ -GenericName[km]=កម្មវិធី​គំនូរ -GenericName[kn]=ಚಿತ್ರರಚನೆಯ ತಂತ್ರಾಂಶ -GenericName[ko]=미술 프로그램 -GenericName[kok]=पिंतरावणेची कारयावळ -GenericName[kok@roman]= pintravnne kareavoll -GenericName[ks]=ڈرائنگ پروگرام -GenericName[ks@devanagari]=डरायींग परुगराम -GenericName[ku]=Bernameya Xêzkirinê -GenericName[lb]=Molprogramm -GenericName[lg]=Enteekateeka y'okusiiga -GenericName[lt]=Piešimo programa -GenericName[lv]=Zīmēšanas programma -GenericName[mai]=ड्राइंग कार्यक्रम -GenericName[mk]=Програм за цртање -GenericName[ml]=ചിത്രരചനാ പരിപാടി. -GenericName[mni]=দ্রোইং প্রোগ্রাম -GenericName[mni@meiteimayek]=ꯗ꯭ꯔꯣꯏꯡ ꯄ꯭ꯔꯣꯒ꯭ꯔꯥꯝ -GenericName[mr]=चित्र काढण्यासाठी सॉफ्ट्वेअर -GenericName[ms]=Program melukis -GenericName[nb]=Tegneprogram -GenericName[ne]=ड्रइङ प्रोग्राम -GenericName[nl]=Tekenprogramma -GenericName[nn]=Teikneprogram -GenericName[nr]=Iphrogremu youkudweba -GenericName[nso]=Lenaneo la go thala -GenericName[oc]=Logicial de dessenh -GenericName[or]=ଡ୍ରଇଂ ପ୍ରୋଗ୍ରାମ -GenericName[pa]=ਪੇਂਟਿੰਗ ਕਰਨ ਵਾਲਾ ਸੋਫਟਵੇਰ -GenericName[pl]=Program do rysowania -GenericName[pt]=Programa de desenho -GenericName[pt_BR]=Programa de desenho -GenericName[ro]=Program de desenat -GenericName[ru]=Программа для рисования -GenericName[sa]=आलेखप्रोग्राम् -GenericName[sat]=गार चिता़र तेयार का़मी होरा -GenericName[sat@olchiki]=ᱜᱟᱨ ᱪᱤᱛᱟᱹᱨ ᱛᱮᱭᱟᱨ ᱠᱟᱹᱢᱤ ᱦᱚᱨᱟ -GenericName[sc]=Programma de disinnu -GenericName[sd]=چترڪلا جو پروگرام -GenericName[sd@devanagari]=चित्रकला जो प्रोग्रामु -GenericName[si]=ඇඳීමේ වැඩසටහන -GenericName[sk]=Program na kreslenie -GenericName[sl]=Risarski program -GenericName[son]=Biiteeyan porogaram -GenericName[sq]=Program për vizatim -GenericName[sr]=Програм за цртање -GenericName[sr@latin]=Program za crtanje -GenericName[su]=Program ngagambar -GenericName[sv]=Ritprogram -GenericName[sw]=Programu ya kuchora -GenericName[ta]=வரையும் மென்பொருள் -GenericName[te]=బొమ్మలు గీసె ప్రొగ్రామ్ -GenericName[th]=โปรแกรมวาดรูป -GenericName[tr]=Çizim programı -GenericName[tw]=Adeɛ a yɛde drɔ -GenericName[uk]=Програма для малювання -GenericName[ur]=ڈرائینگ پروگرام -GenericName[ve]=Mbekanyamushumo ya u ola -GenericName[vec]=Programa de dixegno. -GenericName[vi]=Chương trình vẽ -GenericName[wa]=Programe di dessinaedje -GenericName[wo]=Lëlu natal -GenericName[xh]=Inkqubo yokuzoba -GenericName[zam]=Par kuú men -GenericName[zh_CN]=绘图程序 -GenericName[zh_TW]=畫圖程式 -GenericName[zu]=Iprogram yokudweba -Comment=A drawing program for children. -Comment[ach]=Purugram me goyo cal pa lutino. -Comment[af]='n Tekenprogram vir kinders. -Comment[ak]=Mmɔfra drɔɔye nhyehyɛye. -Comment[am]=የልጆች የመሳያ ፍርግም። -Comment[an]=Un programa de dibuixo pa ninos. -Comment[ar]=برنامج رسومات للأطفال. -Comment[as]=শিশুবোৰৰ কাৰণে এটা ড্ৰয়িংৰ কাৰ্য্যসূচী. -Comment[ast]=Un programa de dibuxu pa neños y neñes. -Comment[az]=Uşaqlar üçün rəsm proqramı. -Comment[be]=Дзіцячая праграма для малявання. -Comment[bg]=Програма за рисуване за деца -Comment[bm]=Demisɛnw ka ɲɛgɛn taabolo dɔ. -Comment[bn]=বাচ্চাদের জন্য অঙ্কন প্রোগ্রাম. -Comment[br]=Ur meziant tresañ evit ar vugale. -Comment[brx]=गथ'फोरनि थाखाय मोनसे आखिनाय हाबाफारि। -Comment[bs]=Dječji program za crtanje -Comment[ca]=Un programa de dibuix per a nens petits. -Comment[ca@valencia]=Un programa de dibuix per als menuts. -Comment[cgg]=Akeire kabaana kuteera ebishushani. -Comment[cs]=Kreslicí program pro děti. -Comment[cy]=Rhaglen lunio ar gyfer plant. -Comment[da]=Et tegneprogram for børn. -Comment[de]=Ein Malprogramm für Kinder. -Comment[doi]=बच्चें आस्तै इक्क चित्रकारी प्रोग्राम. -Comment[el]=Ένα πρόγραμμα ζωγραφικής για παιδιά. -Comment[en_AU]=A drawing program for children. -Comment[en_CA]=A drawing program for children. -Comment[en_GB]=A drawing program for children. -Comment[en_ZA]=A drawing program for children. -Comment[eo]=Desegnoprogramo por infanoj. -Comment[es]=Un programa de dibujo para niños. -Comment[es_MX]=Un programa de dibujo para niños. -Comment[et]=Joonistusprogramm lastele. -Comment[eu]=Umeentzako marrazketa programa. -Comment[fa]=یک برنامه نقاشی برای کودکان. -Comment[ff]=Topirde natgol nde sukaaɓe mbaɗanaa. -Comment[fi]=Maalausohjelma lapsille. -Comment[fo]=Eitt tekniforrit til børn. -Comment[fr]=Un programme de dessin pour les enfants. -Comment[ga]=Clár líníochta le haghaidh páistí. -Comment[gd]=Prògram peantaidh don chloinn. -Comment[gl]=Un programa de debuxo para nenos. -Comment[gu]=બાળકો માટે ચિત્ર કાર્યક્રમ. -Comment[he]=תוכנת ציור לילדים. -Comment[hi]=बच्चों के लिए एक ड्राइंग कार्यक्रम| -Comment[hr]=Program za crtanje za djecu. -Comment[hu]=Rajzolóprogram gyerekeknek -Comment[hy]=Նկարչական ծրագիր երեխաների համար: -Comment[id]=Adalah sebuah program gambar untuk anak-anak. -Comment[is]=Teikniforrit fyrir krakka. -Comment[it]=Un programma di disegno per bambini. -Comment[iu]=ᐊᓪᓚᖑᐊᕈᑎ ᐱᐊᕋᕐᓄᑦ. -Comment[ja]=子供向けお絵描きプログラム。 -Comment[ka]=სახატავი პროგრამა ბავშვებისთვის. -Comment[kab]=Ahil n usuneɣ i igerdan. -Comment[km]=កម្មវិធី​គំនូរ​សម្រាប់​ក្មេងៗ ។ -Comment[kn]=ಮಕ್ಕಳಿಗಾಗಿನ ಚಿತ್ರರಚನೆಯ ತಂತ್ರಾಂಶ. -Comment[ko]=어린이를 위한 미술 프로그램 -Comment[kok]=भुरग्यांक पिंतरावणेची कारयावळ -Comment[kok@roman]= bhurgeank pintravnne kareavoll -Comment[ks]=اَکھ ڈرائنگ پروگرام بَچَن خٲطرٕ -Comment[ks@devanagari]=अख डरायींग परुगराम बचन बापत. -Comment[ku]=Bernameyeke xêzkirinê ji bo zarokan. -Comment[lb]=E Molprogramm fir Kanner -Comment[lg]=Enteekateeka y'abaana ey'okusiiga. -Comment[lt]=Piešimo programa vaikams. -Comment[lv]=Zīmēšanas programma bērniem. -Comment[mai]=बच्चा क' लेल एकगोट ड्राइंग कार्यक्रम. -Comment[mk]=Програм за цртање за деца. -Comment[ml]=കുട്ടികള്‍ക്കായുള്ള ഒരു ചിത്രരചനാ പരിപാടി. -Comment[mni]=অঙাংগী দ্রোইং প্রোগ্রাম অমা. -Comment[mni@meiteimayek]=ꯑꯉꯥꯡꯒꯤ ꯗ꯭ꯔꯣꯏꯡ ꯄ꯭ꯔꯣꯒ꯭ꯔꯥꯝ ꯑꯃ. -Comment[mr]=खास मुलांना चित्र काढण्यासाठी बनवलेल सॉफ्टवेअर -Comment[ms]=Program melukis untuk kanak-kanak -Comment[nb]=Et tegneprogram for de yngste. -Comment[ne]=बालकहरूको लागि ड्रइङ प्रोग्राम -Comment[nl]=Een tekenprogramma voor kinderen. -Comment[nn]=Eit teikneprogram for dei yngste. -Comment[nr]=Iphrogremu yokudweba yabantwana. -Comment[nso]=Lenaneo la go thala la bana. -Comment[oc]=Un logicial de dessenh pels mainatges. -Comment[or]=ପିଲାମାନଙ୍କ ପାଇଁ ଏକ ଡ୍ରଇଂ ପ୍ରୋଗ୍ରାମ ୤ -Comment[pa]=ਬਚਿਆਂ ਵਾਸਤੇ ਪੇਂਟਿੰਗ ਕਰਨ ਵਾਲਾ ਸੋਫਟਵੇਰ -Comment[pl]=Program do rysowania dla dzieci. -Comment[pt]=Um programa de desenho para crianças. -Comment[pt_BR]=Um programa de desenho para crianças. -Comment[ro]=Un program de desenat pentru copii. -Comment[ru]=Детская программа для рисования. -Comment[sa]=बालेभ्यः एकम् आलेखप्रोग्राम्। -Comment[sat]=गिदरा़ को ला़गित् मित् गार चिता़र तेयार का़मी होरा. -Comment[sat@olchiki]=ᱜᱤᱫᱨᱟᱹ ᱠᱚ ᱞᱟᱹᱜᱤᱫ ᱢᱤᱫ ᱜᱟᱨ ᱪᱤᱛᱟᱹᱨ ᱛᱮᱭᱟᱨ ᱠᱟᱹᱢᱤ ᱦᱚᱨᱟ ᱾ -Comment[sc]=Programma de disinnu pro sa pitzocalla. -Comment[sd]=ٻارن لاءِ چترڪلا جو پروگرام -Comment[sd@devanagari]=ॿारनि लाइ चित्रकला जो प्रोग्रामु -Comment[si]=ළමයින් සඳහා ඇඳීමේ වැඩසටහන. -Comment[sk]=Program na kreslenie pre deti. -Comment[sl]=Risarski program za otroke -Comment[son]=Biiteeyan porogaram zankey se. -Comment[sq]=Program vizatimi për fëmijë. -Comment[sr]=Дечји програм за цртање -Comment[sr@latin]=Dečji program za crtanje -Comment[su]=Program ngagambar pikeun barudak. -Comment[sv]=Ett ritprogram för barn. -Comment[sw]=Programu kwa watoto kuchora. -Comment[ta]=குழந்தைகள் வரைவதற்கான மென்பொருள் -Comment[te]=పిల్లల కి బొమ్మలు గీసె ప్రొగ్రామ్ -Comment[th]=โปรแกรมวาดรูปสำหรับเด็ก -Comment[tr]=Çocuklar için bir çizim programı -Comment[tw]=Deɛ mmɔfra bɛtumi de adi agorɔ. -Comment[uk]=Дитяча програма для малювання. -Comment[ur]=بچوں كے لئے ڈرائینگ پروگرام۔ -Comment[ve]=Mbekanyamushumo ya u ola ya vhana. -Comment[vec]=Un programa de dixegno par putèi. -Comment[vi]=Một chương trình vẽ cho đứa bé. -Comment[wa]=On programe di dessinaedje po ls efants. -Comment[wo]=Lël lu natal yu ñu jagglel guneyi. -Comment[xh]=Inkqubo yokuzoba yabantwana. -Comment[zam]=Diif program paar keé men Dibuj paar biét biss -Comment[zh_CN]=孩子的绘图程序。 -Comment[zh_TW]=適合兒童的畫圖程式 -Comment[zu]=Iprogremu yokudweba yezingane. From 74506214e74d326e7515af3e0bfde41161d1531f Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 10 Jun 2022 10:36:48 +0100 Subject: [PATCH 4/5] Add appstream metainfo file This is used by software centres such as GNOME Software to display information about the app, both before and after it is installed. The used here follows the recommendations in the Appstream specification, with the exception of violating the spec's strong encouragement to use only lowercase characters. This is because the version that is already published by Flathub uses an uppercase T in the final component of the ID.[0] The file shipped by Fedora followed an older convention of using the desktop file name as the ID. This is acknowledged by the section near the bottom of the file, which will allow software centres to associate the reverse-domain-name ID with the older ID.[1] Many fields in this file are translatable. This was the motivation for the preceeding two changes: - By using xgettext rather than intltool, the untranslated template may be written using the normal appstream XML tags, rather than needing to use (for example) <_name>Tux Paint to mark that field for translation, which renders the template not valid for tools like 'appstreamcli validate'. - Merging translations at build time, rather than committing the translated XML to the repo as well, avoids another potentially error-prone manual step when updating the source file or translations. The release notes are taken from the press releases on the Tuxpaint website. They will be extracted for translation. Another option is to replace the with ..., but AFAIK no software centres currently show these URLs.[2] [0]: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-id-generic [1]: https://www.freedesktop.org/software/appstream/docs/sect-Metadata-Application.html#tag-id-desktopapp [2]: https://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-releases TODO: - align comment Fixes: https://sourceforge.net/p/tuxpaint/feature-requests/172/ --- .gitignore | 2 +- Makefile | 12 +- src/org.tuxpaint.Tuxpaint.metainfo.xml.in | 145 ++++++++++++++++++++++ src/po/POTFILES.in.in | 1 + 4 files changed, 157 insertions(+), 3 deletions(-) create mode 100644 src/org.tuxpaint.Tuxpaint.metainfo.xml.in diff --git a/.gitignore b/.gitignore index 50a434c60..a4cd19c4a 100644 --- a/.gitignore +++ b/.gitignore @@ -15,4 +15,4 @@ TuxPaint.dmg *.thumbs src/po/POTFILES.in src/tuxpaint.desktop - +src/org.tuxpaint.Tuxpaint.metainfo.xml diff --git a/Makefile b/Makefile index 66227bb82..b82771f20 100644 --- a/Makefile +++ b/Makefile @@ -266,6 +266,9 @@ endif ICON_PREFIX:=$(DESTDIR)$(PREFIX)/share/pixmaps X11_ICON_PREFIX:=$(DESTDIR)$(PREFIX)/share/pixmaps +# Appstream metainfo +METAINFO_PREFIX=$(DESTDIR)$(PREFIX)/share/metainfo + # Maemo flag MAEMOFLAG:= @@ -532,6 +535,9 @@ $(MOFILES): trans/%.mo: src/po/%.po %.desktop: %.desktop.in $(POTFILES) msgfmt --desktop -d src/po --template $< -o $@ +%.metainfo.xml: %.metainfo.xml.in $(POTFILES) + msgfmt --xml -d src/po --template $< -o $@ + .PHONY: translations ifeq "$(shell msgfmt -h)" "" translations: trans @@ -541,7 +547,7 @@ translations: trans @echo "Install gettext to run Tux Paint in non-U.S. English modes." @echo "--------------------------------------------------------------" else -translations: trans $(MOFILES) src/tuxpaint.desktop +translations: trans $(MOFILES) src/tuxpaint.desktop src/org.tuxpaint.Tuxpaint.metainfo.xml endif trans: @@ -714,6 +720,7 @@ clean: # are the same as they were when you installed, of course!!! .PHONY: uninstall uninstall: uninstall-i18n + -rm $(METAINFO_PREFIX)/org.tuxpaint.Tuxpaint.metainfo.xml -rm /usr/share/applications/tuxpaint.desktop -rm /usr/share/pixmaps/tuxpaint.png -rm $(ICON_PREFIX)/tuxpaint.png @@ -930,7 +937,7 @@ install-nokia770: # FIXME: No way to install SVG icons using `xdg-icon-resource` # (see https://bugs.launchpad.net/ubuntu/+source/xdg-utils/+bug/790449) .PHONY: install-xdg -install-xdg: src/tuxpaint.desktop +install-xdg: src/tuxpaint.desktop src/org.tuxpaint.Tuxpaint.metainfo.xml @echo @echo "...Installing launcher icon into desktop environment..." @if [ "x$(shell which xdg-icon-resource install)" != "x" ]; then \ @@ -951,6 +958,7 @@ install-xdg: src/tuxpaint.desktop @if [ "x$(shell which update-desktop-database)" != "x" ]; then \ update-desktop-database ; \ fi + install --mode=0644 -t $(METAINFO_PREFIX) src/org.tuxpaint.Tuxpaint.metainfo.xml # Install the PNG icon (for KDE desktop, etc.) # and the 24-color 32x32 XPM (for other Window managers): diff --git a/src/org.tuxpaint.Tuxpaint.metainfo.xml.in b/src/org.tuxpaint.Tuxpaint.metainfo.xml.in new file mode 100644 index 000000000..b0ba9a5bb --- /dev/null +++ b/src/org.tuxpaint.Tuxpaint.metainfo.xml.in @@ -0,0 +1,145 @@ + + + + + org.tuxpaint.Tuxpaint + CC0-1.0 + GPL-3.0+ + Tux Paint + A drawing program for children. + +

+ Tux Paint is a free, award-winning drawing program for children ages 3 to + 12. + Tux Paint is used in schools around the world as a computer literacy + drawing activity. + It combines an easy-to-use interface, fun sound effects, and an + encouraging cartoon mascot who guides children as they use the program. +

+

+ Kids are presented with a blank canvas and a variety of drawing tools to + help them be creative. +

+
+ New Breed Software et al. + https://tuxpaint.org/ + https://sourceforge.net/p/tuxpaint/_list/tickets + https://www.tuxpaint.org/docs/en/html/FAQ.html + https://www.tuxpaint.org/docs/ + + http://www.newbreedsoftware.com/donate/ + https://www.tuxpaint.org/help/po/ + https://www.tuxpaint.org/contact/ + + + https://tuxpaint.org/screenshots/starter-coloringbook.png + The Magic tool is a set of special effects + + + https://tuxpaint.org/screenshots/example_simple.png + The Paint Brush tool lets you draw freehand, using various brushes and colors + + + https://tuxpaint.org/screenshots/example_space.png + The Stamp tool is like a set of rubber stamps or stickers + + + + + +

Tux Paint's Color palette includes a new Color Mixer option, which allows users to combine different proportions of primary colors (red, yellow, and blue) and shades (white, grey, and black) to create new colors, similar to mixing paints.

+

The Color Picker option, which previously offered a static palette of around sixty-five thousand color choices, now supports separate hue, saturation, and value settings, allowing users to choose from over sixteen million colors.

+

Also, a keyboard shortcut is now available for quick access to the Color Selector — the "pipette" tool used for picking colors from the current drawing.

+

The Paint and Lines tools now provide a way to adjust the spacing of brushes, allowing dotted lines or smearing effects to be made. Many brushes have been given better default spacing values, as well.

+

Two new variations of the Zoom Magic Tool, Tile Zoom and Rush, have been added. When shrinking a drawing with Tile Zoom, it replicates the drawing across the canvas in tiles, rather than filling the canvas with a solid background color. The Rush tool blurs the results.

+

Tux Paint's Shapes tool now offers hexagon (6-sided) and heptagon (7-sided) polygons. For shapes which can be stretched (rectangle, oval, etc.), the aspect ratio of the shape is displayed at the bottom while you make your adjustments. Instructional information shown while using some other tools has also been expanded.

+

Keyboard shortcuts, such as [Control]+[S] to save a drawing, are now accessed with the more traditional [⌘ Command] key when using Tux Paint on macOS. Sizing of Tux Paint's built-in on-screen keyboard has been improved. The look and feel of the user documentation has been improved.

+
+
+ + +

Tux Paint's Paint and Line tools now support brushes that rotate based on the angle of the stroke. This new rotation feature, as well as the older directional and animated brush features, are now visually indicated by the brush shape selector. Additionally, the Fill tool now offers a freehand painting mode for interactively coloring within a confined area.

+

Six new Magic tools have been added to Tux Paint. Panels shrinks and duplicates the drawing into a 2-by-2 grid, which is useful for making four-panel comics. Opposite produces complementary colors. Lightning interactively draws a lightning bolt. Reflection creates a lake-like reflection on the drawing. Stretch stretches and squashes the picture like a fun-house mirror. Lastly, Smooth Rainbow provides a more gradual variation of Tux Paint's classic Rainbow tool.

+

A number of existing Magic tools have been updated, as well. Improvements were made to Halftone, which simulates photographs on newsprint; Cartoon, which makes an image look like a cartoon drawing; and TV, which simulates a television screen. Additionally, Cartoon and Halftone, along with Blocks, Chalk, and Emboss, now offer the ability to alter the entire image at once!

+

Finally, Magic tools are now grouped into collections of similar effects — painting, distorts, color filters, picture warps, pattern painting, artistic, and picture decorations — making it easier to find the tool you need.

+
+
+ + +

Tux Paint's Fill tool now offers options to fill an area with color gradients. The "Radial" fill creates a circular gradient centered around the mouse click, while the "Linear" fill allows the interactive creation of gradients at different angles and sizes.

+

New Magic tools have been added to Tux Paint: "Pixels" makes it easier to create retro-gaming style pixel art, "Checkerboard" fills the entire canvas with a check pattern, and "Clone" allows duplicating parts of the picture via brush strokes.

+

Tux Paint's user documentation has been overhauled, making localization easier. Parties interested in helping with localization are encouraged to contact the Tux Paint team.

+

Finally, a new pair of accessibility options have been added. The entire user interface can now be enlarged benefiting users with impaired vision, and making the program more suitable to very high density displays. This feature, along with a new option to re-organize the color palette, can also be helpful to users of coarse input devices, such as eye-gaze tracking systems.

+
+
+ + +

A major improvement has been made to the Shapes tool, which now provides options to choose whether shapes are drawn from the center or a corner, making it easier to use in any situation.

+

The on-screen keyboard, an accessibility feature optionally available when using the Text and Label tools, now appears larger on bigger displays; helpful for users of coarser input devices, such as eye-tracking systems.

+

The Eraser tool adds new, smaller eraser sizes, and applies smoother, contiguous strokes when the pointer is moved quickly.

+

Finally, this newest version adds options to export individual drawings and GIF animations, making it easy to share pictures, cartoons, and slideshows with others.

+
+
+ + +

The latest version has promoted the "Fill" tool, previously found under the "Magic" section of Tux Paint, to the main toolbar, where it's easier to find. It also includes some performance improvements during start-up and when bringing up the "New" drawing dialog. The solid background colors can also be placed at the end of that dialog, allowing emphasis of template images.

+

Tux Paint also now makes it possible to disable stereo sound, which can benefit users with a hearing impairment, or in situations where only one speaker is available.

+
+
+ + +

New in this version are a "color picker", which allows any color within a drawing to be chosen using the pointer, and a set of three-, four-, and five-pointed star shapes.

+

The latest version also incorporates a number of new translations, bringing the number of supported languages up to nearly 130: Bengali, Bodo, Dogri, Kabyle, Urdu, and Devanagari and Perso-Arabic variations of Kashmiri and Sindhi. Thirty other translations have been updated, as well.

+
+
+ +
+ + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + none + + tuxpaint-devel@lists.sourceforge.net + + keyboard + pointing + touch + medium + + + small + + tuxpaint + tuxpaint.desktop + + + tuxpaint.desktop + +
diff --git a/src/po/POTFILES.in.in b/src/po/POTFILES.in.in index ace0b33cc..1f2b83cff 100644 --- a/src/po/POTFILES.in.in +++ b/src/po/POTFILES.in.in @@ -6,6 +6,7 @@ great.h im.c macos.h macos.m +org.tuxpaint.Tuxpaint.metainfo.xml.in shapes.h titles.h tools.h From 21bdf7de1160dfd3037ecb1c3f7f6c805ef110df Mon Sep 17 00:00:00 2001 From: Will Thompson Date: Fri, 10 Jun 2022 10:36:19 +0100 Subject: [PATCH 5/5] Add additional .desktop file categories These are taken from Fedora, which replaces Art with Graphics and adds KidsGame. In my opinion, Art is appropriate, but so are 2DGraphics (hence Graphics) and KidsGame (hence Game). --- src/tuxpaint.desktop.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tuxpaint.desktop.in b/src/tuxpaint.desktop.in index 12b1d1392..5cf84ef6a 100644 --- a/src/tuxpaint.desktop.in +++ b/src/tuxpaint.desktop.in @@ -4,6 +4,6 @@ Type=Application Exec=tuxpaint Icon=tuxpaint Terminal=false -Categories=Education;Art; +Categories=Education;Art;Graphics;2DGraphics;Game;KidsGame; GenericName=Drawing program Comment=A drawing program for children.