aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2022-09-13 16:38:45 +0200
committerRobert Tari <robert@tari.in>2022-09-13 16:38:45 +0200
commitee9f029e6742f3b1fd6506164898e6ff416ae07e (patch)
treecf5bd58114fcecfebe781b319a80b51411357872
parentbeaa19ff667a4e259356556d9653f608cd0b48d1 (diff)
parentb0aa9020581e9e7d961d946716de56c61ee26be2 (diff)
downloadayatana-indicator-power-ee9f029e6742f3b1fd6506164898e6ff416ae07e.tar.gz
ayatana-indicator-power-ee9f029e6742f3b1fd6506164898e6ff416ae07e.tar.bz2
ayatana-indicator-power-ee9f029e6742f3b1fd6506164898e6ff416ae07e.zip
Merge branch 'sunweaver-pr/fix-and-update-translation-template'
Attributes GH PR #64: https://github.com/AyatanaIndicators/ayatana-indicator-power/pull/64
-rw-r--r--data/CMakeLists.txt7
-rw-r--r--data/org.ayatana.indicator.power.gschema.xml24
-rw-r--r--data/org.ayatana.indicator.power.gschema.xml.in24
-rw-r--r--po/POTFILES.in2
-rw-r--r--po/ayatana-indicator-power.pot102
-rwxr-xr-xupdate-po.sh1
-rwxr-xr-xupdate-pot.sh1
7 files changed, 78 insertions, 83 deletions
diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
index e269b30..c445b3c 100644
--- a/data/CMakeLists.txt
+++ b/data/CMakeLists.txt
@@ -3,13 +3,6 @@
##
set (SCHEMA_NAME "org.ayatana.indicator.power.gschema.xml")
-set (SCHEMA_FILE "${CMAKE_CURRENT_BINARY_DIR}/${SCHEMA_NAME}")
-set (SCHEMA_FILE_IN "${CMAKE_CURRENT_SOURCE_DIR}/${SCHEMA_NAME}.in")
-
-# generate the .xml file using intltool
-find_package(Intltool REQUIRED)
-set (ENV{LC_ALL} "C")
-intltool_merge_translations("${SCHEMA_FILE_IN}" "${SCHEMA_FILE}" ALL UTF8 STYLE "xml" NO_TRANSLATIONS)
# let GSettings do the rest
find_package(GSettings REQUIRED)
diff --git a/data/org.ayatana.indicator.power.gschema.xml b/data/org.ayatana.indicator.power.gschema.xml
new file mode 100644
index 0000000..1e30e31
--- /dev/null
+++ b/data/org.ayatana.indicator.power.gschema.xml
@@ -0,0 +1,24 @@
+<schemalist>
+ <enum id="ayatana-indicator-power-icon-policy-enum">
+ <value nick="present" value="0" />
+ <value nick="charge" value="1" />
+ <value nick="never" value="2" />
+ </enum>
+ <schema gettext-domain="ayatana-indicator-power" id="org.ayatana.indicator.power" path="/org/ayatana/indicator/power/">
+ <key name="show-time" type="b">
+ <default>false</default>
+ <summary>Show time in Menu Bar</summary>
+ <description>Whether or not to show the time in the menu bar.</description>
+ </key>
+ <key name="show-percentage" type="b">
+ <default>false</default>
+ <summary>Show percentage in Menu Bar</summary>
+ <description>Whether or not to show the percentage in the menu bar.</description>
+ </key>
+ <key enum="ayatana-indicator-power-icon-policy-enum" name="icon-policy">
+ <default>"present"</default>
+ <summary>When to show the battery status in the menu bar?</summary>
+ <description>Options for when to show battery status. Valid options are "present", "charge", and "never".</description>
+ </key>
+ </schema>
+</schemalist>
diff --git a/data/org.ayatana.indicator.power.gschema.xml.in b/data/org.ayatana.indicator.power.gschema.xml.in
deleted file mode 100644
index 867173a..0000000
--- a/data/org.ayatana.indicator.power.gschema.xml.in
+++ /dev/null
@@ -1,24 +0,0 @@
-<schemalist>
- <enum id="ayatana-indicator-power-icon-policy-enum">
- <value nick="present" value="0" />
- <value nick="charge" value="1" />
- <value nick="never" value="2" />
- </enum>
- <schema gettext-domain="@GETTEXT_PACKAGE@" id="org.ayatana.indicator.power" path="/org/ayatana/indicator/power/">
- <key name="show-time" type="b">
- <default>false</default>
- <_summary>Show time in Menu Bar</_summary>
- <_description>Whether or not to show the time in the menu bar.</_description>
- </key>
- <key name="show-percentage" type="b">
- <default>false</default>
- <_summary>Show percentage in Menu Bar</_summary>
- <_description>Whether or not to show the percentage in the menu bar.</_description>
- </key>
- <key enum="ayatana-indicator-power-icon-policy-enum" name="icon-policy">
- <default>"present"</default>
- <_summary>When to show the battery status in the menu bar?</_summary>
- <_description>Options for when to show battery status. Valid options are "present", "charge", and "never".</_description>
- </key>
- </schema>
-</schemalist>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index ccf4a36..d4ebd76 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -1,4 +1,4 @@
-data/org.ayatana.indicator.power.gschema.xml.in
+data/org.ayatana.indicator.power.gschema.xml
src/device.c
src/notifier.c
src/service.c
diff --git a/po/ayatana-indicator-power.pot b/po/ayatana-indicator-power.pot
index 3c41f76..d3ccfd3 100644
--- a/po/ayatana-indicator-power.pot
+++ b/po/ayatana-indicator-power.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2022-09-05 13:34+0200\n"
+"POT-Creation-Date: 2022-09-11 14:01+0200\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"
@@ -18,134 +18,134 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
-#: ../data/org.ayatana.indicator.power.gschema.xml.in:1
+#: data/org.ayatana.indicator.power.gschema.xml:1
msgid "Show time in Menu Bar"
msgstr ""
-#: ../data/org.ayatana.indicator.power.gschema.xml.in:2
+#: data/org.ayatana.indicator.power.gschema.xml:2
msgid "Whether or not to show the time in the menu bar."
msgstr ""
-#: ../data/org.ayatana.indicator.power.gschema.xml.in:3
+#: data/org.ayatana.indicator.power.gschema.xml:3
msgid "Show percentage in Menu Bar"
msgstr ""
-#: ../data/org.ayatana.indicator.power.gschema.xml.in:4
+#: data/org.ayatana.indicator.power.gschema.xml:4
msgid "Whether or not to show the percentage in the menu bar."
msgstr ""
-#: ../data/org.ayatana.indicator.power.gschema.xml.in:5
+#: data/org.ayatana.indicator.power.gschema.xml:5
msgid "When to show the battery status in the menu bar?"
msgstr ""
-#: ../data/org.ayatana.indicator.power.gschema.xml.in:6
+#: data/org.ayatana.indicator.power.gschema.xml:6
msgid ""
"Options for when to show battery status. Valid options are \"present\", "
"\"charge\", and \"never\"."
msgstr ""
#. TRANSLATORS: system power cord
-#: ../src/device.c:525
+#: src/device.c:525
msgid "AC Adapter"
msgstr ""
#. TRANSLATORS: laptop primary battery
-#: ../src/device.c:529 ../src/service.c:456
+#: src/device.c:529 ../src/service.c:456
msgid "Battery"
msgstr ""
#. TRANSLATORS: battery-backed AC power source
-#: ../src/device.c:533
+#: src/device.c:533
msgid "UPS"
msgstr ""
#. TRANSLATORS: a monitor is a device to measure voltage and current
-#: ../src/device.c:537
+#: src/device.c:537
msgid "Monitor"
msgstr ""
#. TRANSLATORS: wireless mice with internal batteries
-#: ../src/device.c:541
+#: src/device.c:541
msgid "Mouse"
msgstr ""
#. TRANSLATORS: wireless keyboard with internal battery
-#: ../src/device.c:545
+#: src/device.c:545
msgid "Keyboard"
msgstr ""
#. TRANSLATORS: portable device
-#: ../src/device.c:549
+#: src/device.c:549
msgid "PDA"
msgstr ""
#. TRANSLATORS: cell phone (mobile...)
-#: ../src/device.c:553
+#: src/device.c:553
msgid "Cell phone"
msgstr ""
#. TRANSLATORS: media player, mp3 etc
-#: ../src/device.c:557
+#: src/device.c:557
msgid "Media player"
msgstr ""
#. TRANSLATORS: tablet device
-#: ../src/device.c:561
+#: src/device.c:561
msgid "Tablet"
msgstr ""
#. TRANSLATORS: tablet device
-#: ../src/device.c:565
+#: src/device.c:565
msgid "Computer"
msgstr ""
#. TRANSLATORS: game controller/joystick with internal batteries
-#: ../src/device.c:569
+#: src/device.c:569
msgid "Gaming input"
msgstr ""
#. TRANSLATORS: unknown device
-#: ../src/device.c:573
+#: src/device.c:573
msgid "Unknown"
msgstr ""
-#: ../src/device.c:613
+#: src/device.c:613
#, c-format
msgid "estimating…"
msgstr ""
-#: ../src/device.c:617
+#: src/device.c:617
#, c-format
msgid "unknown"
msgstr ""
#. TRANSLATORS: H:MM (hours, minutes) to charge the battery. Example: "1:30 to charge"
-#: ../src/device.c:646
+#: src/device.c:646
#, c-format
msgid "%0d:%02d to charge"
msgstr ""
#. TRANSLATORS: H:MM (hours, minutes) to discharge the battery. Example: "1:30 left"
-#: ../src/device.c:651
+#: src/device.c:651
#, c-format
msgid "%0d:%02d left"
msgstr ""
#. TRANSLATORS: "X (hour,hours) Y (minute,minutes) to charge" the battery.
#. Example: "1 hour 10 minutes to charge"
-#: ../src/device.c:686
+#: src/device.c:686
#, c-format
msgid "%d %s %d %s to charge"
msgstr ""
-#: ../src/device.c:687 ../src/device.c:705
+#: src/device.c:687 ../src/device.c:705
msgid "hour"
msgid_plural "hours"
msgstr[0] ""
msgstr[1] ""
-#: ../src/device.c:688 ../src/device.c:695 ../src/device.c:706
-#: ../src/device.c:713
+#: src/device.c:688 ../src/device.c:695 ../src/device.c:706
+#: src/device.c:713
msgid "minute"
msgid_plural "minutes"
msgstr[0] ""
@@ -153,109 +153,109 @@ msgstr[1] ""
#. TRANSLATORS: "Y (minute,minutes) to charge" the battery.
#. Example: "59 minutes to charge"
-#: ../src/device.c:694
+#: src/device.c:694
#, c-format
msgid "%d %s to charge"
msgstr ""
#. TRANSLATORS: "X (hour,hours) Y (minute,minutes) left" until the battery's empty.
#. Example: "1 hour 10 minutes left"
-#: ../src/device.c:704
+#: src/device.c:704
#, c-format
msgid "%d %s %d %s left"
msgstr ""
#. TRANSLATORS: "Y (minute,minutes) left" until the battery's empty.
#. Example: "59 minutes left"
-#: ../src/device.c:712
+#: src/device.c:712
#, c-format
msgid "%d %s left"
msgstr ""
#. TRANSLATORS: example: "battery (charged)"
-#: ../src/device.c:769
+#: src/device.c:769
#, c-format
msgid "%s (charged)"
msgstr ""
#. TRANSLATORS: example: "battery (time remaining)"
-#: ../src/device.c:786
+#: src/device.c:786
#, c-format
msgid "%s (%s)"
msgstr ""
#. TRANSLATORS: after the icon, a time-remaining string + battery %. Example: "(0:59, 33%)"
-#: ../src/device.c:858
+#: src/device.c:858
#, c-format
msgid "(%s, %.0lf%%)"
msgstr ""
#. TRANSLATORS: after the icon, a time-remaining string Example: "(0:59)"
-#: ../src/device.c:863
+#: src/device.c:863
#, c-format
msgid "(%s)"
msgstr ""
#. TRANSLATORS: after the icon, a battery %. Example: "(33%)"
-#: ../src/device.c:868
+#: src/device.c:868
#, c-format
msgid "(%.0lf%%)"
msgstr ""
-#: ../src/notifier.c:301
+#: src/notifier.c:301
msgid "Battery Low"
msgstr ""
-#: ../src/notifier.c:302
+#: src/notifier.c:302
msgid "Battery Critical"
msgstr ""
-#: ../src/notifier.c:304
+#: src/notifier.c:304
#, c-format
msgid "%.0f%% charge remaining"
msgstr ""
-#: ../src/notifier.c:339
+#: src/notifier.c:339
msgid "OK"
msgstr ""
-#: ../src/notifier.c:340
+#: src/notifier.c:340
msgid "Battery settings"
msgstr ""
-#: ../src/service.c:458
+#: src/service.c:458
msgid "Battery status and power management"
msgstr ""
-#: ../src/service.c:583
+#: src/service.c:583
msgid "Charge level"
msgstr ""
-#: ../src/service.c:651
+#: src/service.c:651
msgid "Power Settings…"
msgstr ""
-#: ../src/service.c:677
+#: src/service.c:677
msgid "Adjust brightness automatically"
msgstr ""
-#: ../src/service.c:685
+#: src/service.c:685
msgid "Flashlight"
msgstr ""
-#: ../src/service.c:691
+#: src/service.c:691
msgid "Warning: Heavy use can damage the LED!"
msgstr ""
-#: ../src/service.c:697
+#: src/service.c:697
msgid "Battery settings…"
msgstr ""
-#: ../src/service.c:848 ../src/utils.c:68
+#: src/service.c:848 ../src/utils.c:68
msgid "Warning"
msgstr ""
-#: ../src/service.c:849
+#: src/service.c:849
msgid ""
"The Ayatana Power Indicator does not support evoking the\n"
"power statistics application of your desktop environment, yet.\n"
@@ -264,7 +264,7 @@ msgid ""
"https://github.com/ArcticaProject/ayatana-indicator-power/issues"
msgstr ""
-#: ../src/utils.c:69
+#: src/utils.c:69
msgid ""
"The Ayatana Power Indicator does not support evoking the\n"
"power settings dialog of your desktop environment, yet.\n"
diff --git a/update-po.sh b/update-po.sh
index dff6f3a..b066610 100755
--- a/update-po.sh
+++ b/update-po.sh
@@ -32,6 +32,7 @@ cat LINGUAS | while read lingua; do
-e 's/\.ini\.in\.h:/.ini.in:/g' \
-e 's/\.xml\.h:/.xml:/g' \
-e 's/\.ini\.h:/.ini:/g' \
+ -e 's@#: \.\./@#: @g' \
-i ${lingua}.po
done
diff --git a/update-pot.sh b/update-pot.sh
index 43a8d06..cb538a2 100755
--- a/update-pot.sh
+++ b/update-pot.sh
@@ -22,4 +22,5 @@ sed -e 's/\.xml\.in\.h:/.xml.in:/g' \
-e 's/\.ini\.in\.h:/.ini.in:/g' \
-e 's/\.xml\.h:/.xml:/g' \
-e 's/\.ini\.h:/.ini:/g' \
+ -e 's@#: \.\./@#: @g' \
-i po/${GETTEXT_DOMAIN}.pot