Files @ ae9d205f4407
Branch filter:

Location: kallithea/MIT-Permissive-License.txt

Thomas De Schampheleire
scripts/i18n: add command 'normalize-po-files'

The translation files in the Kallithea repository contained references to
the location(s) of each string in the repository. This is useful to
translators, but is not needed for all other users.

The big problem with that information is that it changes very commonly as a
result of normal development in Kallithea, causing a lot of unimportant
delta in the Kallithea repository, thus causing unnecessary repository
growth.

In this commit, a basic version of the script is added, only containing the
code to normalize the translation files by removing generated and outdated
data.

This can be used to check or ensure internal consistency between code and
translations, by extracting and merging and then removing most of it again with
normalize-po-files:

./setup.py extract_messages

for po in kallithea/i18n/*/LC_MESSAGES/kallithea.po; do msgmerge --width=76 --backup=none --previous --update $po kallithea/i18n/kallithea.pot ; done

scripts/i18n normalize-po-files kallithea/i18n/kallithea.pot kallithea/i18n/*/LC_MESSAGES/kallithea.po

Includes contributions from Mads Kiilerich.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.