mirror of
https://github.com/jtheoof/swappy.git
synced 2024-08-17 02:30:47 +03:00
feat(i18n): setup i18n for swappy
This makes swappy more i18n friendly through the use of `gettext` with `meson` i18n module.
This commit is contained in:
parent
cab6a0ee7a
commit
5b3c8aded8
@ -51,6 +51,7 @@ if libnotify.found()
|
||||
endif
|
||||
|
||||
subdir('res')
|
||||
subdir('src/po')
|
||||
|
||||
executable(
|
||||
'swappy',
|
||||
|
@ -92,7 +92,7 @@
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">B</property>
|
||||
<property name="label" translatable="no">B</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -104,7 +104,7 @@
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">T</property>
|
||||
<property name="label" translatable="no">T</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -116,7 +116,7 @@
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">R</property>
|
||||
<property name="label" translatable="no">R</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -128,7 +128,7 @@
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">O</property>
|
||||
<property name="label" translatable="no">O</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -140,7 +140,7 @@
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">A</property>
|
||||
<property name="label" translatable="no">A</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -152,7 +152,7 @@
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">D</property>
|
||||
<property name="label" translatable="no">D</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@ -176,7 +176,7 @@
|
||||
<property name="homogeneous">True</property>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="brush">
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="label" translatable="no"></property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
@ -192,7 +192,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="text">
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="label" translatable="no"></property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
@ -208,7 +208,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="rectangle">
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="label" translatable="no"></property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
@ -224,7 +224,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="ellipse">
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="label" translatable="no"></property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
@ -240,7 +240,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="arrow">
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="label" translatable="no"></property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
@ -256,7 +256,7 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkRadioButton" id="blur">
|
||||
<property name="label" translatable="yes"></property>
|
||||
<property name="label" translatable="no"></property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="receives_default">False</property>
|
||||
|
2
src/po/LINGUAS
Normal file
2
src/po/LINGUAS
Normal file
@ -0,0 +1,2 @@
|
||||
# Set of available languages.
|
||||
en
|
1
src/po/POTFILES
Normal file
1
src/po/POTFILES
Normal file
@ -0,0 +1 @@
|
||||
res/swappy.glade
|
50
src/po/en.po
Normal file
50
src/po/en.po
Normal file
@ -0,0 +1,50 @@
|
||||
# English translations for swappy package.
|
||||
# Copyright (C) 2020 THE swappy'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the swappy package.
|
||||
# Automatically generated, 2020.
|
||||
#
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: swappy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-06-21 21:57-0400\n"
|
||||
"PO-Revision-Date: 2020-06-21 21:57-0400\n"
|
||||
"Last-Translator: Automatically generated\n"
|
||||
"Language-Team: none\n"
|
||||
"Language: en\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=ASCII\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
|
||||
#: res/swappy.glade:455
|
||||
msgid "Line Width"
|
||||
msgstr "Line Width"
|
||||
|
||||
#: res/swappy.glade:525
|
||||
msgid "Text Size"
|
||||
msgstr "Text Size"
|
||||
|
||||
#: res/swappy.glade:641
|
||||
msgid "Toggle Paint Panel"
|
||||
msgstr "Toggle Paint Panel"
|
||||
|
||||
#: res/swappy.glade:667
|
||||
msgid "Undo Last Paint"
|
||||
msgstr "Undo Last Paint"
|
||||
|
||||
#: res/swappy.glade:686
|
||||
msgid "Redo Previous Paint"
|
||||
msgstr "Redo Previous Paint"
|
||||
|
||||
#: res/swappy.glade:705
|
||||
msgid "Clear Paints"
|
||||
msgstr "Clear Paints"
|
||||
|
||||
#: res/swappy.glade:733
|
||||
msgid "Copy Surface"
|
||||
msgstr "Copy Surface"
|
||||
|
||||
#: res/swappy.glade:749
|
||||
msgid "Save Surface"
|
||||
msgstr "Save Surface"
|
8
src/po/meson.build
Normal file
8
src/po/meson.build
Normal file
@ -0,0 +1,8 @@
|
||||
i18n = import('i18n')
|
||||
|
||||
# define GETTEXT_PACKAGE
|
||||
add_project_arguments('-DGETTEXT_PACKAGE="intltest"', language:'c')
|
||||
|
||||
i18n.gettext(meson.project_name(),
|
||||
args: '--directory=' + meson.source_root()
|
||||
)
|
50
src/po/swappy.pot
Normal file
50
src/po/swappy.pot
Normal file
@ -0,0 +1,50 @@
|
||||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
|
||||
# This file is distributed under the same license as the swappy package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: swappy\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2020-06-21 21:57-0400\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"Language: \n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=CHARSET\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: res/swappy.glade:455
|
||||
msgid "Line Width"
|
||||
msgstr ""
|
||||
|
||||
#: res/swappy.glade:525
|
||||
msgid "Text Size"
|
||||
msgstr ""
|
||||
|
||||
#: res/swappy.glade:641
|
||||
msgid "Toggle Paint Panel"
|
||||
msgstr ""
|
||||
|
||||
#: res/swappy.glade:667
|
||||
msgid "Undo Last Paint"
|
||||
msgstr ""
|
||||
|
||||
#: res/swappy.glade:686
|
||||
msgid "Redo Previous Paint"
|
||||
msgstr ""
|
||||
|
||||
#: res/swappy.glade:705
|
||||
msgid "Clear Paints"
|
||||
msgstr ""
|
||||
|
||||
#: res/swappy.glade:733
|
||||
msgid "Copy Surface"
|
||||
msgstr ""
|
||||
|
||||
#: res/swappy.glade:749
|
||||
msgid "Save Surface"
|
||||
msgstr ""
|
Loading…
Reference in New Issue
Block a user