<feed xmlns='http://www.w3.org/2005/Atom'>
<title>luci/build/i18n-scan.pl, branch master</title>
<subtitle>Lua Configuration Interface (mirror)</subtitle>
<id>https://git.openwrt.org/project/luci/atom?h=master</id>
<link rel='self' href='https://git.openwrt.org/project/luci/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/'/>
<updated>2024-01-03T13:14:06Z</updated>
<entry>
<title>build: update build/i18n-* tools</title>
<updated>2024-01-03T13:14:06Z</updated>
<author>
<name>Paul Donald</name>
</author>
<published>2024-01-03T13:14:06Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=b98d8c526e05d658856a83c469f79957223fbfd6'/>
<id>urn:sha1:b98d8c526e05d658856a83c469f79957223fbfd6</id>
<content type='text'>
modify i18n-add-language.sh so it can:
- be run from any path
- bootstrap any (or all) po folder(s) with existing language(s)
- (partially) update luci.mk with new languages

deprecate build/i18n-init.sh

Signed-off-by: Paul Donald &lt;newtwen@gmail.com&gt;
</content>
</entry>
<entry>
<title>build: i18n-scan.pl: process HTTPS DNS proxy provider descriptions</title>
<updated>2023-08-31T13:53:01Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2023-08-31T13:52:05Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=b729af9ff5ad016daeb3aa91374a5ab7a6cd58cd'/>
<id>urn:sha1:b729af9ff5ad016daeb3aa91374a5ab7a6cd58cd</id>
<content type='text'>
Ref: https://github.com/openwrt/luci/pull/6546#issue-1872235715
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>build: i18n-scan.pl: add support for ucode sources and templates</title>
<updated>2022-10-24T23:03:37Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2022-09-14T09:57:29Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=c1709d15bd45437eb73f4b42ebcb3c3f174a9b17'/>
<id>urn:sha1:c1709d15bd45437eb73f4b42ebcb3c3f174a9b17</id>
<content type='text'>
Recognize ucode source files and ucode templates and add the necessary logic
to preprocess ucode templates into valid JavaScript sources.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>build: i18n-scan.pl: make ACL descriptions translatable</title>
<updated>2020-04-17T14:12:03Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2020-04-17T14:11:34Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=0bc29706408c4cf8746917a6e4d4045397adca64'/>
<id>urn:sha1:0bc29706408c4cf8746917a6e4d4045397adca64</id>
<content type='text'>
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-app-statistics: convert plugin definitions to JSON</title>
<updated>2020-02-06T11:54:07Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2020-02-06T11:07:08Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=556e14c74307a9b93291e7c25d5eb71ab3260ab6'/>
<id>urn:sha1:556e14c74307a9b93291e7c25d5eb71ab3260ab6</id>
<content type='text'>
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>luci-base: add support for plural translations and contexts in Lua api</title>
<updated>2020-01-25T22:21:35Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2020-01-23T20:53:26Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=9939fc5a26d07da4756497bb6a7dc51dcf379e98'/>
<id>urn:sha1:9939fc5a26d07da4756497bb6a7dc51dcf379e98</id>
<content type='text'>
 - Introduce a new luci.template.parser.ntranslate() function which
   takes a count, a singular and a plural translation string as well
   as an optional context argument and returns the appropriate,
   language specific plural translation.

 - Introduce an optional translation context argument in the existing
   luci.template.parser.translate() function

 - Support translation contexts in LuCI template directives.
   Translation messages are split on the first unescaped pipe
   character and the reamining string after the pipe is treated
   as context.

Examples:

 - `string.format(p.ntranslate(n, "1 apple", "%d apples"), n)` will
   return an appropriate plural translation for the given amount.

 - `translate("Load", "The system load")` will return an appropiate
   translation for `Load`, using `The system load` as disambiguation
   context (a `msgctxt` directive in *.po files).

 - Likewise `&lt;%:Load|The system load%&gt;` will translate the word
   `Load` while using the remainder of the string as context.

 - To use pipes in translations strings literally, they must be
   escaped: `&lt;%:Use the "\|" character%&gt;` will translate the literal
   string `Use the "|" character`.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>build: i18n-scan.pl: use xgettext to extract message strings</title>
<updated>2020-01-22T21:02:24Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2020-01-21T17:39:32Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=901a0821f66b1623ea04d1930a2e6e336138263a'/>
<id>urn:sha1:901a0821f66b1623ea04d1930a2e6e336138263a</id>
<content type='text'>
Using xgettext has a few benefits compared to the previous perl extraction
approach. The xgettext utility is able to properly distinguish commented
from uncommented code and it is able handle concatenated constant
expressions such as `_("Some " + "string")`.

A further benefit is the ability to extract translations with disambiguation
contexts and plural translation calls.

Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>build: sort location annotation table in i18n sync process</title>
<updated>2020-01-08T19:21:23Z</updated>
<author>
<name>Hannu Nyman</name>
</author>
<published>2020-01-07T16:58:33Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=460bdfe814a34ca5300e7a1a57efecff590dd414'/>
<id>urn:sha1:460bdfe814a34ca5300e7a1a57efecff590dd414</id>
<content type='text'>
The scanning routine has caused unnecessary changes to the .po files
if a string has been found in multiple files and those files have been
found in different order than the previous time.

Sort the location annotations to avoid unnecessary changes to the .po files.
(sort is alphabetic, so the line numbers are also sorted alphabetically)

Signed-off-by: Hannu Nyman &lt;hannu.nyman@iki.fi&gt;
[apply a Schwartzian transform to sort locations by path, then line number]
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>build: i18n-scan.pl: support extracting translations from menu json</title>
<updated>2019-12-16T17:07:17Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2019-12-06T13:54:45Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=9f9358c3e2184c6bac373c93176c474f2658a632'/>
<id>urn:sha1:9f9358c3e2184c6bac373c93176c474f2658a632</id>
<content type='text'>
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
<entry>
<title>build: i18n-scan.pl: properly handle bracket-quoted strings</title>
<updated>2019-05-31T18:11:56Z</updated>
<author>
<name>Jo-Philipp Wich</name>
</author>
<published>2019-05-31T18:09:41Z</published>
<link rel='alternate' type='text/html' href='https://git.openwrt.org/project/luci/commit/?id=4bbc033a968478d54a6c4bc2d8529abbfffdec6f'/>
<id>urn:sha1:4bbc033a968478d54a6c4bc2d8529abbfffdec6f</id>
<content type='text'>
Fixes: #2738
Signed-off-by: Jo-Philipp Wich &lt;jo@mein.io&gt;
</content>
</entry>
</feed>
