diff options
| author | Viatrix | 2026-03-16 20:07:10 -0700 |
|---|---|---|
| committer | Viatrix | 2026-03-16 20:07:10 -0700 |
| commit | 83a15469296f86c636257000fc7fef187465b89e (patch) | |
| tree | 182eb4899803440bb65d7b7f9eec3a4141481793 | |
| parent | b7c5d7b4060baf845eb06e642a1fe96fb073ba0e (diff) | |
Makefile and .pot preparing for translation.
| -rw-r--r-- | Makefile | 21 | ||||
| -rw-r--r-- | imagemap.pot | 40 | ||||
| -rw-r--r-- | imagemap.py | 2 |
3 files changed, 62 insertions, 1 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0a29892 --- /dev/null +++ b/Makefile @@ -0,0 +1,21 @@ +zip: mo + zip - *.py *.inx locale/*/LC_MESSAGES/*.mo > imagemap.zip + +validate: inkscape.extension.rng + xmllint --noout --relaxng inkscape.extension.rng *.inx + +pot: inx.its + xgettext imagemap.inx --its=inx.its -o imagemap.pot + xgettext imagemap.py --package-name=inx.imagemap --copyright-holder=VIATRIX.COMPUTER -jo imagemap.pot + +mo: + for po in locale/*/imagemap.po; do \ + mkdir -p "$${po%/*}/LC_MESSAGES"; \ + msgfmt -o "$${po%/*}/LC_MESSAGES/imagemap.mo" $$po; \ + done + +inx.its: + wget https://gitlab.com/inkscape/translations/-/raw/master/its/inx.its + +inkscape.extension.rng: + wget https://gitlab.com/inkscape/extensions/-/raw/master/inkex/tester/inkscape.extension.rng diff --git a/imagemap.pot b/imagemap.pot new file mode 100644 index 0000000..8a743a7 --- /dev/null +++ b/imagemap.pot @@ -0,0 +1,40 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR VIATRIX.COMPUTER +# This file is distributed under the same license as the inx.imagemap package. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: inx.imagemap\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2026-03-16 20:04-0700\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=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#: imagemap.inx:3 +msgid "Save as Image Map" +msgstr "" + +#: imagemap.inx:6 +msgid "Map Type" +msgstr "" + +#: imagemap.inx:14 +msgid "Web Image Map (*.map)" +msgstr "" + +#: imagemap.py:108 +msgid "" +"Image has no hyperlinks.\n" +"Add a hyperlink to an object with right-click → \"{}\"." +msgstr "" + +#: imagemap.py:142 +msgid "The hyperlink \"{}\" could not be added to the output." +msgstr "" diff --git a/imagemap.py b/imagemap.py index 9eb4132..c7d462d 100644 --- a/imagemap.py +++ b/imagemap.py @@ -139,7 +139,7 @@ class ImageMap(inkex.OutputExtension): href=None # because subsequent subpaths must be enclaves for i in range(len(shapes)): alt=links[i]['alt'] - if len(shapes[i])==0: inkex.errormsg(_("The hyperlink \"{}\" is not present in the output.").format(links[i]['href'])) + if len(shapes[i])==0: inkex.errormsg(_("The hyperlink \"{}\" could not be added to the output.").format(links[i]['href'])) for j in shapes[i]: attrs=links[i].copy() attrs['alt']=alt |
