diff options
| author | Kate Murphy <hello@kate.io> | 2019-04-17 21:16:38 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-17 21:16:38 -0400 |
| commit | 8a2b6287ee630bf9c1d0eff3f219565773b47651 (patch) | |
| tree | fd5454040832b82d3b5362d0118c1c7a1cff37cb | |
| parent | d388dc60854131a7b749be278ff24045869870de (diff) | |
| parent | 3251b94332c291689cc76751a7be8629a6c7e64a (diff) | |
Merge pull request #437 from inkstitch/locale-releases
Separate locales into different releases
| -rw-r--r-- | Makefile | 16 | ||||
| -rw-r--r-- | lib/inx/utils.py | 13 | ||||
| -rw-r--r-- | templates/auto_satin.inx | 4 | ||||
| -rw-r--r-- | templates/convert_to_satin.inx | 4 | ||||
| -rw-r--r-- | templates/cut_satin.inx | 4 | ||||
| -rw-r--r-- | templates/embroider.inx | 5 | ||||
| -rw-r--r-- | templates/flip.inx | 4 | ||||
| -rw-r--r-- | templates/global_commands.inx | 6 | ||||
| -rw-r--r-- | templates/install.inx | 4 | ||||
| -rw-r--r-- | templates/layer_commands.inx | 4 | ||||
| -rw-r--r-- | templates/lettering.inx | 5 | ||||
| -rw-r--r-- | templates/object_commands.inx | 4 | ||||
| -rw-r--r-- | templates/params.inx | 4 | ||||
| -rw-r--r-- | templates/print.inx | 4 | ||||
| -rw-r--r-- | templates/simulate.inx | 4 |
15 files changed, 35 insertions, 50 deletions
@@ -7,7 +7,6 @@ ARCH:=$(shell uname -m) dist: distclean locales inx bin/build-dist $(EXTENSIONS) - cp inx/*.inx dist cp -a images/examples dist/inkstitch cp -a palettes dist/inkstitch cp -a symbols dist/inkstitch @@ -15,11 +14,16 @@ dist: distclean locales inx cp -a icons dist/inkstitch/bin cp -a locales dist/inkstitch/bin cp -a print dist/inkstitch/bin - if [ "$$BUILD" = "windows" ]; then \ - cd dist; zip -r ../inkstitch-$(VERSION)-win32.zip *; \ - else \ - cd dist; tar zcf ../inkstitch-$(VERSION)-$(OS)-$(ARCH).tar.gz *; \ - fi + for d in inx/*; do \ + lang=$${d%.*}; \ + lang=$${lang#*/}; \ + cp $$d/*.inx dist; \ + if [ "$$BUILD" = "windows" ]; then \ + cd dist; zip -r ../inkstitch-$(VERSION)-win32-$$lang.zip *; cd ..; \ + else \ + cd dist; tar zcf ../inkstitch-$(VERSION)-$(OS)-$(ARCH)-$$lang.tar.gz *; cd ..; \ + fi; \ + done distclean: rm -rf build dist inx locales *.spec *.tar.gz *.zip diff --git a/lib/inx/utils.py b/lib/inx/utils.py index a22b1892..1dc96829 100644 --- a/lib/inx/utils.py +++ b/lib/inx/utils.py @@ -1,3 +1,4 @@ +import errno import os import gettext from os.path import dirname @@ -28,8 +29,16 @@ def build_environment(): def write_inx_file(name, contents): - inx_file_name = "inkstitch_%s_%s.inx" % (name, current_locale) - with open(os.path.join(inx_path, inx_file_name), 'w') as inx_file: + inx_locale_dir = os.path.join(inx_path, current_locale) + + try: + os.makedirs(inx_locale_dir) + except OSError as e: + if e.errno != errno.EEXIST: + raise + + inx_file_name = "inkstitch_%s.inx" % name + with open(os.path.join(inx_locale_dir, inx_file_name), 'w') as inx_file: print >> inx_file, contents.encode("utf-8") diff --git a/templates/auto_satin.inx b/templates/auto_satin.inx index d825d8a1..60ca29cd 100644 --- a/templates/auto_satin.inx +++ b/templates/auto_satin.inx @@ -11,9 +11,7 @@ <object-type>all</object-type> <effects-menu> <submenu name="Ink/Stitch"> - <submenu name="{% trans %}English{% endtrans %}"> - <submenu name="{% trans %}Satin Tools{% endtrans %}" /> - </submenu> + <submenu name="{% trans %}Satin Tools{% endtrans %}" /> </submenu> </effects-menu> </effect> diff --git a/templates/convert_to_satin.inx b/templates/convert_to_satin.inx index d214502a..d0f87911 100644 --- a/templates/convert_to_satin.inx +++ b/templates/convert_to_satin.inx @@ -9,9 +9,7 @@ <object-type>all</object-type> <effects-menu> <submenu name="Ink/Stitch"> - <submenu name="{% trans %}English{% endtrans %}"> - <submenu name="{% trans %}Satin Tools{% endtrans %}" /> - </submenu> + <submenu name="{% trans %}Satin Tools{% endtrans %}" /> </submenu> </effects-menu> </effect> diff --git a/templates/cut_satin.inx b/templates/cut_satin.inx index 4d330f06..c96d9092 100644 --- a/templates/cut_satin.inx +++ b/templates/cut_satin.inx @@ -9,9 +9,7 @@ <object-type>all</object-type> <effects-menu> <submenu name="Ink/Stitch"> - <submenu name="{% trans %}English{% endtrans %}"> - <submenu name="{% trans %}Satin Tools{% endtrans %}" /> - </submenu> + <submenu name="{% trans %}Satin Tools{% endtrans %}" /> </submenu> </effects-menu> </effect> diff --git a/templates/embroider.inx b/templates/embroider.inx index 54f3be1b..f030c8d6 100644 --- a/templates/embroider.inx +++ b/templates/embroider.inx @@ -19,10 +19,7 @@ <effect> <object-type>all</object-type> <effects-menu> - <submenu name="Ink/Stitch"> - {# L10N This is used for the submenu under Extensions -> Ink/Stitch. Translate this to your language's word for its language, e.g. "Español" for the spanish translation. #} - <submenu name="{% trans %}English{% endtrans %}" /> - </submenu> + <submenu name="Ink/Stitch" /> </effects-menu> </effect> <script> diff --git a/templates/flip.inx b/templates/flip.inx index ef2000d6..763cf7cc 100644 --- a/templates/flip.inx +++ b/templates/flip.inx @@ -9,9 +9,7 @@ <object-type>all</object-type> <effects-menu> <submenu name="Ink/Stitch"> - <submenu name="{% trans %}English{% endtrans %}"> - <submenu name="{% trans %}Satin Tools{% endtrans %}" /> - </submenu> + <submenu name="{% trans %}Satin Tools{% endtrans %}" /> </submenu> </effects-menu> </effect> diff --git a/templates/global_commands.inx b/templates/global_commands.inx index eda2721d..24d42c90 100644 --- a/templates/global_commands.inx +++ b/templates/global_commands.inx @@ -13,10 +13,8 @@ <object-type>all</object-type> <effects-menu> <submenu name="Ink/Stitch"> - <submenu name="{% trans %}English{% endtrans %}"> - {# L10N Inkscape submenu under Extensions -> Ink/Stitch #} - <submenu name="{% trans %}Commands{% endtrans %}" /> - </submenu> + {# L10N Inkscape submenu under Extensions -> Ink/Stitch #} + <submenu name="{% trans %}Commands{% endtrans %}" /> </submenu> </effects-menu> </effect> diff --git a/templates/install.inx b/templates/install.inx index f3aa6c0a..adfffd9d 100644 --- a/templates/install.inx +++ b/templates/install.inx @@ -8,9 +8,7 @@ <effect> <object-type>all</object-type> <effects-menu> - <submenu name="Ink/Stitch"> - <submenu name="{% trans %}English{% endtrans %}" /> - </submenu> + <submenu name="Ink/Stitch" /> </effects-menu> </effect> <script> diff --git a/templates/layer_commands.inx b/templates/layer_commands.inx index f1a8f987..6b978e43 100644 --- a/templates/layer_commands.inx +++ b/templates/layer_commands.inx @@ -13,9 +13,7 @@ <object-type>all</object-type> <effects-menu> <submenu name="Ink/Stitch"> - <submenu name="{% trans %}English{% endtrans %}"> - <submenu name="{% trans %}Commands{% endtrans %}" /> - </submenu> + <submenu name="{% trans %}Commands{% endtrans %}" /> </submenu> </effects-menu> </effect> diff --git a/templates/lettering.inx b/templates/lettering.inx index 88d683ef..96e90ca0 100644 --- a/templates/lettering.inx +++ b/templates/lettering.inx @@ -8,10 +8,7 @@ <effect> <object-type>all</object-type> <effects-menu> - <submenu name="Ink/Stitch"> - {# L10N This is used for the submenu under Extensions -> Ink/Stitch. Translate this to your language's word for its language, e.g. "Español" for the spanish translation. #} - <submenu name="{% trans %}English{% endtrans %}" /> - </submenu> + <submenu name="Ink/Stitch" /> </effects-menu> </effect> <script> diff --git a/templates/object_commands.inx b/templates/object_commands.inx index 68535db2..1b1c40d9 100644 --- a/templates/object_commands.inx +++ b/templates/object_commands.inx @@ -12,9 +12,7 @@ <object-type>all</object-type> <effects-menu> <submenu name="Ink/Stitch"> - <submenu name="{% trans %}English{% endtrans %}"> - <submenu name="{% trans %}Commands{% endtrans %}" /> - </submenu> + <submenu name="{% trans %}Commands{% endtrans %}" /> </submenu> </effects-menu> </effect> diff --git a/templates/params.inx b/templates/params.inx index f785b15c..9f60f4ae 100644 --- a/templates/params.inx +++ b/templates/params.inx @@ -8,9 +8,7 @@ <effect> <object-type>all</object-type> <effects-menu> - <submenu name="Ink/Stitch"> - <submenu name="{% trans %}English{% endtrans %}" /> - </submenu> + <submenu name="Ink/Stitch" /> </effects-menu> </effect> <script> diff --git a/templates/print.inx b/templates/print.inx index 9e5a9dcd..32053842 100644 --- a/templates/print.inx +++ b/templates/print.inx @@ -8,9 +8,7 @@ <effect> <object-type>all</object-type> <effects-menu> - <submenu name="Ink/Stitch"> - <submenu name="{% trans %}English{% endtrans %}" /> - </submenu> + <submenu name="Ink/Stitch" /> </effects-menu> </effect> <script> diff --git a/templates/simulate.inx b/templates/simulate.inx index 33919cbb..90f3717c 100644 --- a/templates/simulate.inx +++ b/templates/simulate.inx @@ -8,9 +8,7 @@ <effect> <object-type>all</object-type> <effects-menu> - <submenu name="Ink/Stitch"> - <submenu name="{% trans %}English{% endtrans %}" /> - </submenu> + <submenu name="Ink/Stitch" /> </effects-menu> </effect> <script> |
