Skip to content
This repository has been archived by the owner on Jan 27, 2024. It is now read-only.

Commit

Permalink
Make AppStream translations more general
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWiederhake committed Mar 25, 2020
1 parent 2cd6fec commit e40e03a
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 15 deletions.
22 changes: 22 additions & 0 deletions AppStream/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,24 @@ MSGFMT_PATH=msgfmt

all: translate

# I fucked up some of the language codes.
# Fixing it in Transifex would require me to recreate these groups,
# deleting all old translations and potentially losing the translators.
# This is ugly, but better than losing translators.
# The space in the matching pattern excludes the "Language-Team:" field.

po/de.po: po/de_DE.po
sed -re 's/ de_DE/ de/' $< > $@

po/it.po: po/it_IT.po
sed -re 's/ it_IT/ it/' $< > $@

po/pl.po: po/pl_PL.po
sed -re 's/ pl_PL/ pl/' $< > $@

po/ru.po: po/ru_RU.po
sed -re 's/ ru_RU/ ru/' $< > $@

po/%.mo: po/%.po
${MSGFMT_PATH} -cf -o $@ $<

Expand All @@ -43,3 +61,7 @@ potfile: po/telegram-purple.metainfo.xml.pot

.PHONY: translate
translate: telegram-purple.metainfo.xml

.PHONY: clean
clean:
rm -rf po/*.mo po/de.po po/it.po po/pl.po po/ru.po
6 changes: 6 additions & 0 deletions AppStream/po/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
/*.mo

# I fucked up the locale names on Transifex; these are actually just intermediates:
/de.po
/it.po
/pl.po
/ru.po
8 changes: 4 additions & 4 deletions AppStream/po/LINGUAS
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
bg
cs_CZ
de_DE
de
es
es_AR
fr
it_IT
it
nl
nn
pl_PL
pl
pt_BR
ru_RU
ru
sq
uk
22 changes: 13 additions & 9 deletions AppStream/telegram-purple.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,33 @@
<name>Telegram</name>
<name xml:lang="bg">Telegram</name>
<name xml:lang="cs-CZ">Telegram</name>
<name xml:lang="de-DE">Telegram</name>
<name xml:lang="de">Telegram</name>
<name xml:lang="es">Telegram</name>
<name xml:lang="es-AR">Telegram</name>
<name xml:lang="fr">Telegram</name>
<name xml:lang="it-IT">Telegram</name>
<name xml:lang="it">Telegram</name>
<name xml:lang="nl">Telegram</name>
<name xml:lang="pl-PL">Telegram</name>
<name xml:lang="ru-RU">Telegram</name>
<name xml:lang="nn">Telegram</name>
<name xml:lang="pl">Telegram</name>
<name xml:lang="pt-BR">Telegram</name>
<name xml:lang="ru">Telegram</name>
<name xml:lang="sq">Telegram</name>
<name xml:lang="uk">Телеграм</name>
<summary>A plugin that adds support for Telegram</summary>
<summary xml:lang="bg">Добавка, която добавя поддръжка на Telegram</summary>
<summary xml:lang="cs-CZ">Zásuvný modul, který přidá podporu pro Telegram</summary>
<summary xml:lang="de-DE">Plugin zur Unterstützung von Telegram</summary>
<summary xml:lang="de">Plugin zur Unterstützung von Telegram</summary>
<summary xml:lang="es">Un plugin que añade soporte para Telegram</summary>
<summary xml:lang="es-AR">Un plugin que agrega soporte para Telegram</summary>
<summary xml:lang="fr">Une extension qui ajoute le support pour Telegram</summary>
<summary xml:lang="it-IT">Un plugin che aggiunge il supporto per Telegram</summary>
<summary xml:lang="it">Un plugin che aggiunge il supporto per Telegram</summary>
<summary xml:lang="nl">Een plug-in die ondersteuning voor Telegram toevoegt</summary>
<summary xml:lang="pl-PL">Wtyczka dodająca obsługę protokołu Telegram</summary>
<summary xml:lang="ru-RU">Плагин, добавляющий поддержку Telegram</summary>
<summary xml:lang="nn">Eit programtillegg for å kunna nytta Telegram</summary>
<summary xml:lang="pl">Wtyczka dodająca obsługę protokołu Telegram</summary>
<summary xml:lang="pt-BR">Um plugin que adiciona suporte para o Telegram</summary>
<summary xml:lang="ru">Плагин, добавляющий поддержку Telegram</summary>
<summary xml:lang="sq">Një shtojcë që shton mbulim për Telegram-in</summary>
<summary xml:lang="uk">Плагін, що додає підтримку у Телеграм</summary>
<summary xml:lang="uk">Плагін, що дає підтримку Телеграм</summary>
<url type="homepage">https://github.com/majn/telegram-purple</url>
<url type="bugtracker">https://github.com/majn/telegram-purple/issues/</url>
<metadata_license>GFDL-1.3</metadata_license>
Expand Down
4 changes: 2 additions & 2 deletions HACKING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Write [an issue](https://github.com/majn/telegram-purple/issues/new), shoot us a

#### Translations

Make sure that the string freeze has already happened.
Ideally, do a string freeze beforehand; however, this has proven to be too impractical for this project.

Go to the [translation site](https://www.transifex.com/telegram-purple-developers/telegram-purple/content/),
and close the current resource for new translations. Rename and re-prioritize it appropriately.
Expand All @@ -36,7 +36,7 @@ Run `make po/*.po` to fix the filenames. Do not delete any files. Rationale se

Adjust `po/LINGUAS*` as you see fit.

Also import the translations for `AppStream/po/`.
Also import the translations for `AppStream/po/`, and run `make -C Appstream translate`.

#### Increment version

Expand Down

0 comments on commit e40e03a

Please sign in to comment.