From e40e03a6cd97b6fccb562fc27d29e0c5884459a4 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Wed, 25 Mar 2020 21:32:38 +0100 Subject: [PATCH] Make AppStream translations more general --- AppStream/Makefile | 22 ++++++++++++++++++++++ AppStream/po/.gitignore | 6 ++++++ AppStream/po/LINGUAS | 8 ++++---- AppStream/telegram-purple.metainfo.xml | 22 +++++++++++++--------- HACKING.md | 4 ++-- 5 files changed, 47 insertions(+), 15 deletions(-) diff --git a/AppStream/Makefile b/AppStream/Makefile index a2059052..544c89e5 100644 --- a/AppStream/Makefile +++ b/AppStream/Makefile @@ -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 $@ $< @@ -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 diff --git a/AppStream/po/.gitignore b/AppStream/po/.gitignore index 85ebba84..b31416d4 100644 --- a/AppStream/po/.gitignore +++ b/AppStream/po/.gitignore @@ -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 diff --git a/AppStream/po/LINGUAS b/AppStream/po/LINGUAS index 1a17f2c6..9c40ea56 100644 --- a/AppStream/po/LINGUAS +++ b/AppStream/po/LINGUAS @@ -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 diff --git a/AppStream/telegram-purple.metainfo.xml b/AppStream/telegram-purple.metainfo.xml index 67ecfa9a..95d25e4c 100644 --- a/AppStream/telegram-purple.metainfo.xml +++ b/AppStream/telegram-purple.metainfo.xml @@ -9,29 +9,33 @@ Telegram Telegram Telegram - Telegram + Telegram Telegram Telegram Telegram - Telegram + Telegram Telegram - Telegram - Telegram + Telegram + Telegram + Telegram + Telegram Telegram Телеграм A plugin that adds support for Telegram Добавка, която добавя поддръжка на Telegram Zásuvný modul, který přidá podporu pro Telegram - Plugin zur Unterstützung von Telegram + Plugin zur Unterstützung von Telegram Un plugin que añade soporte para Telegram Un plugin que agrega soporte para Telegram Une extension qui ajoute le support pour Telegram - Un plugin che aggiunge il supporto per Telegram + Un plugin che aggiunge il supporto per Telegram Een plug-in die ondersteuning voor Telegram toevoegt - Wtyczka dodająca obsługę protokołu Telegram - Плагин, добавляющий поддержку Telegram + Eit programtillegg for å kunna nytta Telegram + Wtyczka dodająca obsługę protokołu Telegram + Um plugin que adiciona suporte para o Telegram + Плагин, добавляющий поддержку Telegram Një shtojcë që shton mbulim për Telegram-in - Плагін, що додає підтримку у Телеграм + Плагін, що дає підтримку Телеграм https://github.com/majn/telegram-purple https://github.com/majn/telegram-purple/issues/ GFDL-1.3 diff --git a/HACKING.md b/HACKING.md index c98f60bb..70477701 100644 --- a/HACKING.md +++ b/HACKING.md @@ -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. @@ -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