Skip to content

Commit

Permalink
Prevent duplicates in pot file
Browse files Browse the repository at this point in the history
  • Loading branch information
clefebvre committed Aug 26, 2013
1 parent aa3e915 commit aa8d316
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 54 deletions.
104 changes: 54 additions & 50 deletions cinnamon.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-08-26 11:04+0100\n"
"POT-Creation-Date: 2013-08-26 11:51+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: \n"
"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"

#: generate_additional_files.py:50
Expand Down Expand Up @@ -330,7 +330,8 @@ msgstr ""

#: js/ui/main.js:420
msgid ""
"Cinnamon is currently running without video hardware acceleration and, as a result, you may observe much higher than normal CPU usage.\n"
"Cinnamon is currently running without video hardware acceleration and, as a "
"result, you may observe much higher than normal CPU usage.\n"
"\n"
msgstr ""

Expand Down Expand Up @@ -1764,6 +1765,8 @@ msgstr ""
msgid "Wallpaper"
msgstr ""

#. #-#-#-#-# uniq-cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->effect->options
#: files/usr/lib/cinnamon-settings/modules/cs_backgrounds.py:23
#: files/usr/lib/cinnamon-settings/modules/cs_effects.py:80
#: files/usr/lib/cinnamon-settings/modules/cs_effects.py:84
Expand Down Expand Up @@ -2830,7 +2833,8 @@ msgstr ""
#, c-format
msgid ""
"\n"
"This key combination, '<b>%s</b>' cannot be used because it would become impossible to type using this key.\n"
"This key combination, '<b>%s</b>' cannot be used because it would become "
"impossible to type using this key.\n"
"\n"
msgstr ""

Expand All @@ -2842,8 +2846,7 @@ msgstr ""

#: files/usr/lib/cinnamon-settings/modules/cs_keyboard.py:598
#, c-format
msgid ""
"This key combination, '<b>%s</b>' is currently in use by '<b>%s</b>'. "
msgid "This key combination, '<b>%s</b>' is currently in use by '<b>%s</b>'. "
msgstr ""

#: files/usr/lib/cinnamon-settings/modules/cs_keyboard.py:599
Expand Down Expand Up @@ -2936,11 +2939,15 @@ msgstr ""
msgid "Sensitivity:"
msgstr ""

#. #-#-#-#-# uniq-cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->quality->options
#: files/usr/lib/cinnamon-settings/modules/cs_mouse.py:63
#: files/usr/lib/cinnamon-settings/modules/cs_mouse.py:136
msgid "Low"
msgstr ""

#. #-#-#-#-# uniq-cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->quality->options
#: files/usr/lib/cinnamon-settings/modules/cs_mouse.py:63
#: files/usr/lib/cinnamon-settings/modules/cs_mouse.py:136
msgid "High"
Expand Down Expand Up @@ -3406,7 +3413,8 @@ msgstr ""
#, c-format
msgid ""
"Some %s can be added multiple times.\n"
" Use this to add another instance. Use panel edit mode to remove a single instance."
" Use this to add another instance. Use panel edit mode to remove a single "
"instance."
msgstr ""

#: files/usr/lib/cinnamon-settings/bin/ExtensionCore.py:147
Expand Down Expand Up @@ -3584,7 +3592,8 @@ msgstr ""
#, c-format
msgid ""
"Some %s can be added multiple times.\n"
"Use this to add another instance. Use panel edit mode to remove a single instance."
"Use this to add another instance. Use panel edit mode to remove a single "
"instance."
msgstr ""

#: files/usr/lib/cinnamon-settings/bin/ExtensionCore.py:966
Expand Down Expand Up @@ -3651,15 +3660,16 @@ msgstr ""
#: files/usr/lib/cinnamon-settings/bin/Spices.py:423
#, c-format
msgid ""
"Could not install the settings schema for %s. You will have to perform this"
" step yourself."
"Could not install the settings schema for %s. You will have to perform this "
"step yourself."
msgstr ""

#: files/usr/lib/cinnamon-settings/bin/Spices.py:449
#: files/usr/lib/cinnamon-settings/bin/Spices.py:498
#, c-format
msgid ""
"An error occurred during installation or updating. You may wish to report this incident to the developer of %s.\n"
"An error occurred during installation or updating. You may wish to report "
"this incident to the developer of %s.\n"
"\n"
"If this was an update, the previous installation is unchanged"
msgstr ""
Expand Down Expand Up @@ -3763,7 +3773,8 @@ msgstr ""
#: files/usr/lib/cinnamon-settings/bin/XletSettingsWidgets.py:106
msgid ""
"There was a problem importing the configuration file.\n"
"Please check that it is a valid JSON file, and is appropriate for this applet/desklet/extension.\n"
"Please check that it is a valid JSON file, and is appropriate for this "
"applet/desklet/extension.\n"
"The original configuration file is unchanged."
msgstr ""

Expand All @@ -3773,9 +3784,12 @@ msgstr ""

#: files/usr/lib/cinnamon-settings/bin/XletSettingsWidgets.py:180
msgid ""
"The MD5 tags for the file you are trying to import and the existing file do not match.\n"
"This means the two files were generated by different versions of this applet, desklet or extension,\n"
"or possibly from a different one entirely. Continuing with this procedure could yield unpredictable results.\n"
"The MD5 tags for the file you are trying to import and the existing file do "
"not match.\n"
"This means the two files were generated by different versions of this "
"applet, desklet or extension,\n"
"or possibly from a different one entirely. Continuing with this procedure "
"could yield unpredictable results.\n"
"\n"
"Are you sure you want to proceed?"
msgstr ""
Expand Down Expand Up @@ -3832,18 +3846,21 @@ msgstr ""
msgid "Fade delay:"
msgstr ""

#. #-#-#-#-# cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->fade-delay->units
#. #-#-#-#-# cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->delay->units
#. #-#-#-#-# cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->fade-delay->units
#. #-#-#-#-# cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->delay->units
msgid "seconds"
msgstr ""

#. [email protected]>settings-schema.json->effect->description
msgid "Special effect:"
msgstr ""

#. [email protected]>settings-schema.json->effect->options
msgid "None"
msgstr ""

#. [email protected]>settings-schema.json->effect->options
msgid "Sepia"
msgstr ""
Expand All @@ -3856,26 +3873,29 @@ msgstr ""
msgid "Height:"
msgstr ""

#. #-#-#-#-# cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->height->units
#. #-#-#-#-# cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->width->units
#. #-#-#-#-# cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->spinner-number->units
#. #-#-#-#-# cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->height->units
#. #-#-#-#-# cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->width->units
#. #-#-#-#-# cinnamon-json.pot #-#-#-#-#
#. [email protected]>settings-schema.json->spinner-number->units
msgid "pixels"
msgstr ""

#. [email protected]>settings-schema.json->delay->description
msgid "Delay:"
msgstr ""

#. [email protected]>settings-schema.json->delay->units
msgid "seconds"
msgstr ""

#. [email protected]>settings-schema.json->width->description
msgid "Width:"
msgstr ""

#. [email protected]>settings-schema.json->width->units
msgid "pixels"
msgstr ""

#. [email protected]>settings-schema.json->directory->description
msgid "Folder:"
msgstr ""
Expand All @@ -3884,26 +3904,14 @@ msgstr ""
msgid "Image quality:"
msgstr ""

#. [email protected]>settings-schema.json->quality->options
msgid "High"
msgstr ""

#. [email protected]>settings-schema.json->quality->options
msgid "Medium"
msgstr ""

#. [email protected]>settings-schema.json->quality->options
msgid "Low"
msgstr ""

#. [email protected]>settings-schema.json->font-size->description
msgid "Font size:"
msgstr ""

#. [email protected]>settings-schema.json->font-size->units
msgid ""
msgstr ""

#. [email protected]>settings-schema.json->date-format->description
msgid "Date format:"
msgstr ""
Expand Down Expand Up @@ -3986,8 +3994,8 @@ msgstr ""

#. [email protected]>settings-schema.json->scale-demo->tooltip
msgid ""
"If you adjust this scale, it updates in the applet. If you adjust the scale"
" in the applet, it updates here"
"If you adjust this scale, it updates in the applet. If you adjust the scale "
"in the applet, it updates here"
msgstr ""

#. [email protected]>settings-schema.json->demo-
Expand All @@ -4014,8 +4022,8 @@ msgstr ""
#. [email protected]>settings-schema.json->use-custom-
#. label->tooltip
msgid ""
"Checking this box allows you to set a custom label in the field below - this"
" demonstrates setting dependencies"
"Checking this box allows you to set a custom label in the field below - this "
"demonstrates setting dependencies"
msgstr ""

#. [email protected]>settings-schema.json->spinner-
Expand All @@ -4026,12 +4034,8 @@ msgstr ""
#. [email protected]>settings-schema.json->spinner-
#. number->tooltip
msgid ""
"Increase or decrease this spinner value to make the applet wider or narrower"
" in the panel"
msgstr ""

#. [email protected]>settings-schema.json->spinner-number->units
msgid "pixels"
"Increase or decrease this spinner value to make the applet wider or narrower "
"in the panel"
msgstr ""

#. [email protected]>settings-schema.json->width->description
Expand Down
6 changes: 4 additions & 2 deletions files/usr/lib/cinnamon-json-makepot/cinnamon-json-makepot.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ def extract_strings(self, data, parent=""):
comment = "%s->settings-schema.json->%s->%s" % (self.current_parent_dir, parent, key)
entry = polib.POEntry(comment=comment)
entry.msgid = data[key]
self.po.append(entry)
if entry.msgid != "":
self.po.append(entry)
elif key in "options":
opt_data = data[key]
for option in opt_data.keys():
Expand All @@ -126,7 +127,8 @@ def extract_strings(self, data, parent=""):
comment = "%s->settings-schema.json->%s->%s" % (self.current_parent_dir, parent, key)
entry = polib.POEntry(comment=comment)
entry.msgid = option
self.po.append(entry)
if entry.msgid != "":
self.po.append(entry)
try:
self.extract_strings(data[key], key)
except AttributeError:
Expand Down
7 changes: 5 additions & 2 deletions makepot
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#!/bin/bash
xgettext --language=C --keyword=_ --output=cinnamon.pot generate_additional_files.py src/*.c src/*/*.c js/*/*.js files/usr/share/cinnamon/applets/*/applet.js files/usr/share/cinnamon/desklets/*/desklet.js files/usr/lib/cinnamon-settings/*.py files/usr/lib/cinnamon-settings-users/*.py files/usr/lib/cinnamon-settings/modules/*.py files/usr/lib/cinnamon-settings/bin/ExtensionCore.py files/usr/lib/cinnamon-settings/bin/eyedropper.py files/usr/lib/cinnamon-settings/bin/Spices.py files/usr/lib/cinnamon-settings/bin/XletSettings.py files/usr/lib/cinnamon-settings/bin/XletSettingsWidgets.py files/usr/share/cinnamon/desklets/*/*.py files/usr/lib/cinnamon-screensaver-lock-dialog/*.py files/usr/bin/cinnamon-launcher
xgettext --language=C --keyword=_ --output=cinnamon-source.pot generate_additional_files.py src/*.c src/*/*.c js/*/*.js files/usr/share/cinnamon/applets/*/applet.js files/usr/share/cinnamon/desklets/*/desklet.js files/usr/lib/cinnamon-settings/*.py files/usr/lib/cinnamon-settings-users/*.py files/usr/lib/cinnamon-settings/modules/*.py files/usr/lib/cinnamon-settings/bin/ExtensionCore.py files/usr/lib/cinnamon-settings/bin/eyedropper.py files/usr/lib/cinnamon-settings/bin/Spices.py files/usr/lib/cinnamon-settings/bin/XletSettings.py files/usr/lib/cinnamon-settings/bin/XletSettingsWidgets.py files/usr/share/cinnamon/desklets/*/*.py files/usr/lib/cinnamon-screensaver-lock-dialog/*.py files/usr/bin/cinnamon-launcher
cd files
usr/lib/cinnamon-json-makepot/cinnamon-json-makepot.py ../cinnamon
usr/lib/cinnamon-json-makepot/cinnamon-json-makepot.py ../cinnamon-json
cd ..
msguniq cinnamon-json.pot > uniq-cinnamon-json.pot
msgcat cinnamon-source.pot uniq-cinnamon-json.pot > cinnamon.pot
rm -f cinnamon-source.pot cinnamon-json.pot uniq-cinnamon-json.pot

0 comments on commit aa8d316

Please sign in to comment.