Skip to content

Commit 47ff6ed

Browse files
authored
Merge pull request #2 from lenemter/setup-translations
Setup translations
2 parents 5a8a685 + bad0090 commit 47ff6ed

14 files changed

+358
-36
lines changed
File renamed without changes.

meson.build

Lines changed: 32 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,31 @@ project('io.github.xchan14.larawan', 'vala', 'c')
33

44
gnome = import('gnome')
55

6+
i18n = import('i18n')
7+
8+
add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language:'c')
9+
610
asresources = gnome.compile_resources(
711
'as-resources',
812
'data' / meson.project_name() + '.gresource.xml',
913
source_dir: 'data',
1014
c_name: 'as'
1115
)
1216

17+
config_data = configuration_data()
18+
config_data.set_quoted('LOCALEDIR', get_option('prefix') / get_option('localedir'))
19+
config_data.set_quoted('GETTEXT_PACKAGE', meson.project_name())
20+
config_file = configure_file(
21+
input: 'src/Config.vala.in',
22+
output: '@BASENAME@',
23+
configuration: config_data
24+
)
25+
1326
# Create a new executable, list the files we want to compile, list the dependencies we need, and install
1427
executable(
1528
meson.project_name(),
1629
asresources,
30+
config_file,
1731
'src' / 'Application.vala',
1832
'src' / 'Constants.vala',
1933
'src' / 'widgets' / 'EntryButton.vala',
@@ -32,20 +46,26 @@ executable(
3246
install: true
3347
)
3448

35-
# Install our .desktop file so the Applications Menu will see it
36-
install_data(
37-
'data' / meson.project_name() + '.desktop',
38-
install_dir: get_option('datadir') / 'applications',
39-
rename: meson.project_name() + '.desktop'
49+
#Translate and install our .desktop file
50+
i18n.merge_file(
51+
input: 'data' / meson.project_name() + '.desktop.in',
52+
output: meson.project_name() + '.desktop',
53+
po_dir: meson.source_root() / 'po',
54+
type: 'desktop',
55+
install: true,
56+
install_dir: get_option('datadir') / 'applications'
4057
)
4158

42-
# Install our .metainfo.xml file so AppCenter will see it
43-
install_data(
44-
'data' / meson.project_name() + '.metainfo.xml',
45-
install_dir: get_option('datadir') / 'metainfo',
46-
rename: meson.project_name() + '.metainfo.xml'
59+
#Translate and install our .metainfo file
60+
i18n.merge_file(
61+
input: 'data' / meson.project_name() + '.metainfo.xml.in',
62+
output: meson.project_name() + '.metainfo.xml',
63+
po_dir: meson.source_root() / 'po',
64+
install: true,
65+
install_dir: get_option('datadir') / 'metainfo'
4766
)
4867

68+
subdir('data')
69+
subdir('po')
4970

50-
gnome.post_install(glib_compile_schemas: true)
51-
subdir('data')
71+
gnome.post_install(glib_compile_schemas: true)

po/LINGUAS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ru

po/POTFILES

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
data/io.github.xchan14.larawan.desktop.in
2+
data/io.github.xchan14.larawan.metainfo.xml.in
3+
src/models/FileHelper.vala
4+
src/models/SlideshowImage.vala
5+
src/models/SlideshowPlaylist.vala
6+
src/views/MainWindow.vala
7+
src/views/SettingsDialog.vala
8+
src/widgets/EntryButton.vala
9+
src/Application.vala

po/io.github.xchan14.larawan.pot

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
# SOME DESCRIPTIVE TITLE.
2+
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
3+
# This file is distributed under the same license as the io.github.xchan14.larawan package.
4+
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5+
#
6+
#, fuzzy
7+
msgid ""
8+
msgstr ""
9+
"Project-Id-Version: io.github.xchan14.larawan\n"
10+
"Report-Msgid-Bugs-To: \n"
11+
"POT-Creation-Date: 2024-03-01 18:55+0900\n"
12+
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13+
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14+
"Language-Team: LANGUAGE <[email protected]>\n"
15+
"Language: \n"
16+
"MIME-Version: 1.0\n"
17+
"Content-Type: text/plain; charset=CHARSET\n"
18+
"Content-Transfer-Encoding: 8bit\n"
19+
20+
#: data/io.github.xchan14.larawan.desktop.in:6
21+
#: data/io.github.xchan14.larawan.metainfo.xml.in:6
22+
msgid "Larawan"
23+
msgstr ""
24+
25+
#: data/io.github.xchan14.larawan.desktop.in:7
26+
msgid "Make your desktop lively with a slideshow of your photos"
27+
msgstr ""
28+
29+
#: data/io.github.xchan14.larawan.metainfo.xml.in:7
30+
msgid "Slideshow widget"
31+
msgstr ""
32+
33+
#: data/io.github.xchan14.larawan.metainfo.xml.in:13
34+
msgid "Make your desktop lively with a slideshow of your photos."
35+
msgstr ""
36+
37+
#: data/io.github.xchan14.larawan.metainfo.xml.in:15
38+
msgid "Christian Camilon"
39+
msgstr ""
40+
41+
#: data/io.github.xchan14.larawan.metainfo.xml.in:29
42+
msgid "App"
43+
msgstr ""
44+
45+
#: data/io.github.xchan14.larawan.metainfo.xml.in:33
46+
#: src/views/MainWindow.vala:81
47+
msgid "Settings"
48+
msgstr ""
49+
50+
#: data/io.github.xchan14.larawan.metainfo.xml.in:37
51+
msgid "Mid Transition"
52+
msgstr ""
53+
54+
#: data/io.github.xchan14.larawan.metainfo.xml.in:49
55+
msgid "Fixes screenshot not showing in AppCenter"
56+
msgstr ""
57+
58+
#: data/io.github.xchan14.larawan.metainfo.xml.in:50
59+
msgid "Increases default window size"
60+
msgstr ""
61+
62+
#: data/io.github.xchan14.larawan.metainfo.xml.in:57
63+
msgid "Initial Release"
64+
msgstr ""
65+
66+
#: src/views/MainWindow.vala:44
67+
msgid "So Empty!"
68+
msgstr ""
69+
70+
#: src/views/MainWindow.vala:45
71+
msgid ""
72+
"Display album of your choice like your special someone or pets for example."
73+
msgstr ""
74+
75+
#: src/views/MainWindow.vala:50
76+
msgid "Select Album"
77+
msgstr ""
78+
79+
#: src/views/MainWindow.vala:51
80+
msgid "Adds picture from selected album folder and subdirectory."
81+
msgstr ""
82+
83+
#: src/views/MainWindow.vala:54
84+
msgid "Loading Album..."
85+
msgstr ""
86+
87+
#: src/views/SettingsDialog.vala:36
88+
msgid "Slideshow"
89+
msgstr ""
90+
91+
#: src/views/SettingsDialog.vala:45
92+
msgid "Window"
93+
msgstr ""
94+
95+
#: src/views/SettingsDialog.vala:57
96+
msgid "Close"
97+
msgstr ""
98+
99+
#: src/views/SettingsDialog.vala:93
100+
msgid "Album Folder: "
101+
msgstr ""
102+
103+
#: src/views/SettingsDialog.vala:114
104+
msgid "Recursive: "
105+
msgstr ""
106+
107+
#: src/views/SettingsDialog.vala:130
108+
msgid "Will include images from sub-directories if enabled."
109+
msgstr ""
110+
111+
#: src/views/SettingsDialog.vala:141
112+
msgid "Duration: "
113+
msgstr ""
114+
115+
#: src/views/SettingsDialog.vala:164
116+
msgid "Startup: "
117+
msgstr ""
118+
119+
#: src/views/SettingsDialog.vala:170
120+
msgid "Auto start <b>Larawan</b> by adding it "
121+
msgstr ""
122+
123+
#: src/views/SettingsDialog.vala:175
124+
msgid "here."
125+
msgstr ""
126+
127+
#: src/views/SettingsDialog.vala:189
128+
msgid "Width: "
129+
msgstr ""
130+
131+
#: src/views/SettingsDialog.vala:209
132+
msgid "Height: "
133+
msgstr ""
134+
135+
#: src/views/SettingsDialog.vala:229
136+
msgid "Always Visible: "
137+
msgstr ""
138+
139+
#: src/views/SettingsDialog.vala:235
140+
msgid "Right click app > Click <b>Always on Top</b>"
141+
msgstr ""

po/meson.build

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
i18n.gettext(meson.project_name(),
2+
args: '--directory=' + meson.source_root(),
3+
preset: 'glib'
4+
)

po/ru.po

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
# Russian translations for Larawan.
2+
# Copyright (C) 2024 THE PACKAGES'S COPYRIGHT HOLDER
3+
# This file is distributed under the same license as the io.github.xchan14.larawan package.
4+
# lenemter <[email protected]>, 2024.
5+
#
6+
msgid ""
7+
msgstr ""
8+
"Project-Id-Version: io.github.xchan14.larawan\n"
9+
"Report-Msgid-Bugs-To: \n"
10+
"POT-Creation-Date: 2024-03-01 18:55+0900\n"
11+
"PO-Revision-Date: 2024-03-01 18:55+0900\n"
12+
"Last-Translator: lenemter <[email protected]>\n"
13+
"Language-Team: none\n"
14+
"Language: ru\n"
15+
"MIME-Version: 1.0\n"
16+
"Content-Type: text/plain; charset=UTF-8\n"
17+
"Content-Transfer-Encoding: 8bit\n"
18+
19+
#: data/io.github.xchan14.larawan.desktop.in:6
20+
#: data/io.github.xchan14.larawan.metainfo.xml.in:6
21+
msgid "Larawan"
22+
msgstr "Larawan"
23+
24+
#: data/io.github.xchan14.larawan.desktop.in:7
25+
msgid "Make your desktop lively with a slideshow of your photos"
26+
msgstr "Оживите свой рабочий стол с помощью слайд-шоу из ваших фотографий"
27+
28+
#: data/io.github.xchan14.larawan.metainfo.xml.in:7
29+
msgid "Slideshow widget"
30+
msgstr "Слайдшоу виджет"
31+
32+
#: data/io.github.xchan14.larawan.metainfo.xml.in:13
33+
msgid "Make your desktop lively with a slideshow of your photos."
34+
msgstr "Оживите свой рабочий стол с помощью слайд-шоу из ваших фотографий."
35+
36+
#: data/io.github.xchan14.larawan.metainfo.xml.in:15
37+
msgid "Christian Camilon"
38+
msgstr "Christian Camilon"
39+
40+
#: data/io.github.xchan14.larawan.metainfo.xml.in:29
41+
msgid "App"
42+
msgstr "Приложение"
43+
44+
#: data/io.github.xchan14.larawan.metainfo.xml.in:33
45+
#: src/views/MainWindow.vala:81
46+
msgid "Settings"
47+
msgstr "Параметры"
48+
49+
#: data/io.github.xchan14.larawan.metainfo.xml.in:37
50+
msgid "Mid Transition"
51+
msgstr "Переход"
52+
53+
#: data/io.github.xchan14.larawan.metainfo.xml.in:49
54+
msgid "Fixes screenshot not showing in AppCenter"
55+
msgstr "Исправлено отображение снимков в AppCenter"
56+
57+
#: data/io.github.xchan14.larawan.metainfo.xml.in:50
58+
msgid "Increases default window size"
59+
msgstr "Увеличен размер окна по умолчанию"
60+
61+
#: data/io.github.xchan14.larawan.metainfo.xml.in:57
62+
msgid "Initial Release"
63+
msgstr "Начальный выпуск"
64+
65+
#: src/views/MainWindow.vala:44
66+
msgid "So Empty!"
67+
msgstr "Пусто!"
68+
69+
#: src/views/MainWindow.vala:45
70+
msgid ""
71+
"Display album of your choice like your special someone or pets for example."
72+
msgstr "Выберите альбом, например, с вашим любимым человеком или вашими домашними животными."
73+
74+
#: src/views/MainWindow.vala:50
75+
msgid "Select Album"
76+
msgstr "Выберите альбом"
77+
78+
#: src/views/MainWindow.vala:51
79+
msgid "Adds picture from selected album folder and subdirectory."
80+
msgstr "Добавьте изображения из выбранной папки и подпапок альбома"
81+
82+
#: src/views/MainWindow.vala:54
83+
msgid "Loading Album..."
84+
msgstr "Загрузка альбома..."
85+
86+
#: src/views/SettingsDialog.vala:36
87+
msgid "Slideshow"
88+
msgstr "Слайдшоу"
89+
90+
#: src/views/SettingsDialog.vala:45
91+
msgid "Window"
92+
msgstr "Окно"
93+
94+
#: src/views/SettingsDialog.vala:57
95+
msgid "Close"
96+
msgstr "Закрыть"
97+
98+
#: src/views/SettingsDialog.vala:93
99+
msgid "Album Folder: "
100+
msgstr "Папка альбома: "
101+
102+
#: src/views/SettingsDialog.vala:114
103+
msgid "Recursive: "
104+
msgstr "Рекурсивно: "
105+
106+
#: src/views/SettingsDialog.vala:130
107+
msgid "Will include images from sub-directories if enabled."
108+
msgstr "Ищет изображения в подпапках, если включено."
109+
110+
#: src/views/SettingsDialog.vala:141
111+
msgid "Duration: "
112+
msgstr "Длительность: "
113+
114+
#: src/views/SettingsDialog.vala:164
115+
msgid "Startup: "
116+
msgstr "Автозапуск: "
117+
118+
#: src/views/SettingsDialog.vala:170
119+
msgid "Auto start <b>Larawan</b> by adding it "
120+
msgstr "Вы можете добавить <b>Larawan</b> в автозапуск "
121+
122+
#: src/views/SettingsDialog.vala:175
123+
msgid "here."
124+
msgstr "здесь."
125+
126+
#: src/views/SettingsDialog.vala:189
127+
msgid "Width: "
128+
msgstr "Ширина: "
129+
130+
#: src/views/SettingsDialog.vala:209
131+
msgid "Height: "
132+
msgstr "Высота: "
133+
134+
#: src/views/SettingsDialog.vala:229
135+
msgid "Always Visible: "
136+
msgstr "Всегда видимый: "
137+
138+
#: src/views/SettingsDialog.vala:235
139+
msgid "Right click app > Click <b>Always on Top</b>"
140+
msgstr "Нажмите правой кнопкой мыши > <b>Поверх всех окон</b>"

run-dev.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
#!/bin/bash
2-
flatpak run --command=sh --devel --runtime=io.elementary.Platform/x86_64/7.2 io.github.xchan14.larawan
3-
2+
flatpak run --command=sh --devel --runtime=io.elementary.Platform/x86_64/7.3 io.github.xchan14.larawan

run-start.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
#!/bin/bash
2-
G_MESSAGES_DEBUG=all flatpak run --runtime=io.elementary.Platform/x86_64/7.2 io.github.xchan14.larawan
3-
2+
G_MESSAGES_DEBUG=all flatpak run --runtime=io.elementary.Platform/x86_64/7.3 io.github.xchan14.larawan

0 commit comments

Comments
 (0)