Skip to content

Commit 14e9e43

Browse files
mtwebsterclefebvre
authored andcommitted
Use xgettext for translations.
1 parent f13bdd2 commit 14e9e43

8 files changed

Lines changed: 22 additions & 1004 deletions

File tree

data/meson.build

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,32 +2,17 @@
22
install_man('pix.1')
33

44
# .desktop files
5-
6-
desktop_data = configuration_data()
7-
desktop_data.set('VERSION', meson.project_version())
8-
desktop_in_file = configure_file(
9-
input : 'pix.desktop.in.in',
10-
output : 'pix.desktop.in',
11-
configuration : desktop_data
12-
)
13-
145
i18n.merge_file(
15-
input : desktop_in_file,
6+
input : 'pix.desktop.in',
167
output : 'pix.desktop',
178
type : 'desktop',
189
po_dir : po_dir,
1910
install : true,
2011
install_dir : join_paths(datadir, 'applications')
2112
)
2213

23-
desktop_import_in_file = configure_file(
24-
input : 'pix-import.desktop.in.in',
25-
output : 'pix-import.desktop.in',
26-
configuration : desktop_data
27-
)
28-
2914
i18n.merge_file(
30-
input : desktop_import_in_file,
15+
input : 'pix-import.desktop.in',
3116
output : 'pix-import.desktop',
3217
type : 'desktop',
3318
po_dir : po_dir,
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,11 @@
11
[Desktop Entry]
22
Name=Import with Pix
3-
GenericName=Photo Import Tool
4-
X-GNOME-FullName=Pix Photo Import Tool
53
Comment=Import the photos on your camera card
64
Categories=GNOME;GTK;Graphics;Viewer;RasterGraphics;2DGraphics;Photography;
75
Exec=pix --import-photos %U
8-
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
96
Icon=pix
107
MimeType=x-content/image-dcf;x-content/image-picturecd;
118
NoDisplay=true
129
StartupNotify=true
1310
Terminal=false
1411
Type=Application
15-
X-GNOME-Bugzilla-Bugzilla=GNOME
16-
X-GNOME-Bugzilla-Product=pix
17-
X-GNOME-Bugzilla-Component=general
18-
X-GNOME-DocPath=pix/pix.xml
19-
X-GNOME-Bugzilla-Version=@VERSION@
Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
11
[Desktop Entry]
22
Name=Pix
3-
GenericName=Image Viewer
4-
X-GNOME-FullName=Pix Image Viewer
53
Comment=View and organize your images
6-
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
74
Keywords=Image;Viewer;
85
Categories=GNOME;GTK;Graphics;Viewer;RasterGraphics;2DGraphics;Photography;
96
Exec=pix %U
10-
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
117
Icon=pix
128
MimeType=image/bmp;image/jpeg;image/gif;image/png;image/tiff;image/x-bmp;image/x-ico;image/x-png;image/x-pcx;image/x-tga;image/xpm;image/svg+xml;image/webp;image/jxl;
139
StartupNotify=true
1410
Terminal=false
1511
Type=Application
16-
X-GNOME-Bugzilla-Bugzilla=GNOME
17-
X-GNOME-Bugzilla-Product=pix
18-
X-GNOME-Bugzilla-Component=general
19-
X-GNOME-DocPath=pix/pix.xml
20-
X-GNOME-Bugzilla-Version=@VERSION@
2112
Actions=new-window
2213

2314
[Desktop Action new-window]

makepot

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
rm -f pix.pot
2+
touch pix.pot
3+
4+
# Main
5+
xgettext --verbose --package-name=pix --language=Glade --join-existing --add-comments \
6+
--output=pix.pot data/ui/*.ui pix/resources/*.ui
7+
xgettext --verbose --package-name=pix --language=Desktop --join-existing \
8+
-k --keyword=Comment --output=pix.pot data/pix.desktop.in
9+
xgettext --verbose --package-name=pix --language=Desktop --join-existing \
10+
-k --keyword=Comment --keyword=Name --output=pix.pot data/pix-import.desktop.in
11+
xgettext --verbose --language=C --from-code=UTF-8 --join-existing --keyword=_ --keyword=N_\
12+
--output=pix.pot pix/*.c
13+
14+
# Extensions directory
15+
xgettext --verbose --package-name=pix --language=Desktop --join-existing \
16+
-k --keyword=Comment --keyword=Name --output=pix.pot extensions/*/*.desktop.in.in
17+
xgettext --verbose --package-name=pix --language=Glade --join-existing --add-comments \
18+
--output=pix.pot extensions/*/data/ui/*.ui
19+
xgettext --verbose --language=C --from-code=UTF-8 --join-existing --keyword=_ --keyword=N_\
20+
--output=pix.pot extensions/*/*.c

0 commit comments

Comments
 (0)