Ignore:
Timestamp:
2016-11-18T17:53:11+01:00 (8 years ago)
Author:
holgermappt
Message:

Ant target 'pot' must be in build.xml, otherwise gettext doesn't get the paths right. Added section 'Local Translation'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/photoadjust/i18n/README

    r31960 r33072  
    3434    <!-- ** internationalization ** -->
    3535    <import file="i18n/build-i18n.xml"/>
     36    <target name="pot" description="Extract translatable strings from source." depends="gettext-init">
     37        <mkdir dir="${plugin.po.dir}"/>
     38        <gettext-extract keysFile="${ant.project.name}.pot" poDirectory="${plugin.po.dir}" keywords="-k -ktrc:1c,2 -kmarktrc:1c,2 -ktr -kmarktr -ktrn:1,2 -ktrnc:1c,2,3">
     39            <fileset dir="${plugin.src.dir}" includes="**/*.java"/>
     40        </gettext-extract>
     41        <echo file="${plugin.po.dir}/${ant.project.name}.pot" append="true">
     42#. Plugin ${ant.project.name}
     43#: build.xml:1
     44msgid "${plugin.description}"
     45msgstr ""
     46</echo>
     47    </target>
    3648    <target name="additional-manifest">
    3749        <antcall target="mftrans"/>
    3850    </target>
     51
     52Local Translation
     53-----------------
     54To translate the strings locally, e.g. to check that they make sense:
     55* ant pot
     56* LL is a language code, CC is an optional country code
     57* If there is no PO file:
     58  msginit --input=po/*.pot --output-file=po/LL_CC.po --locale=LL_CC
     59* If a PO file exists:
     60  msgmerge --update po/LL_CC.po po/*.pot
    3961
    4062Global Run
Note: See TracChangeset for help on using the changeset viewer.