KWEBAPP-XLIFF(1)

NAME
kwebapp-xliff - extract and merge translatable strings from kwebapp configurations

SYNOPSIS
kwebapp-xliff [-c] -j config [xliff...]
kwebapp-xliff [-c] -u config xliff
kwebapp-xliff [-c] [config]

DESCRIPTION
The kwebapp-xliff utility extracts, merges, and updates translatable strings from and into kwebapp(5) configurations. These strings are used only by kwebapp-javascript(1). By default, kwebapp-xliff extracts all translatable labels. The arguments are as follows:

-c  Instead of creating an empty target when extracting strings, joining translation, or updating with new translations, fill in the target with the source.

-j config
    Merges one or more xliff files with an untranslated kwebapp(5) configuration file config, producing another configuration on standard output containing the translated strings.

-u config
    Update the xliff file with new translation labels found in config. The updated translations are emitted on standard output.

xliff
    An XLIFF 1.2 file containing translated strings.

config
    A kwebapp(5) configuration file.

Translatable content in kwebapp(5) is limited to jslabel phrases for enumerations and bitfields.

The usual usage sequence is as follows:

1.  Extract translatable content from a kwebapp(5) configuration into an XLIFF file.

2.  Give the XLIFF file a target language and translate the strings.

3.  Merge the XLIFF file back into the original kwebapp(5) with -j. Already-translated labels for the given language are not overriden by default.

4.  Use the produced configuration for further use in kwebapp-javascript(1).

With these steps, integral enumeration values produced by the JSON output of kwebapp-c-source(1) and kwebapp-c-header(1) may be translated into human-readable, language-specific labels.

EXIT STATUS

EXAMPLES
Take a dummy configuration containing the following:

    enum foo {
      item bar 0 jslabel "bar";
      item foo 1 jslabel "foo";
    };

When run through kwebapp-xliff, this configuration produces the following translatable strings:

    <xliff version="1.2">
      <file target-language="TODO" tool="kwebapp-xliff">
        <body>
          <trans-unit id="1">
            <source>bar</source>
          </trans-unit>
          <trans-unit id="2">
            <source>foo</source>
          </trans-unit>
        </body>
      </file>
    </xliff>

Change the language into something useful, such as "fr", and translate the strings into "le bar" and "le foo", respectively. Run through kwebapp-xliff -j, this produces:

    enum foo {
      item bar 0
        jslabel "bar"
        jslabel.fr "le bar";
      item foo 1
        jslabel "foo"
        jslabel.fr "le foo";
    };

This output file can then be used with kwebapp-javascript(1) to have per-language label filling.

SEE ALSO
kwebapp-javascript(1), kwebapp(5)