* [PATCH] Add target to incorporate translations from translations.org
@ 2017-01-12 9:47 Siddhesh Poyarekar
2017-01-12 13:59 ` Joseph Myers
0 siblings, 1 reply; 3+ messages in thread
From: Siddhesh Poyarekar @ 2017-01-12 9:47 UTC (permalink / raw)
To: libc-alpha
Add a convenience target for maintainers to download and incorporate
translation updates from translations.org. Invoke as follows:
make -r PARALLELMFLAGS="" -C ../po objdir=`pwd` update-translations
similar to generating libc.pot.
This would be nice to have for the duration of the freeze but I don't mind
waiting till 2.25 to commit if needed.
Siddhesh
* po/Makefile (update-translations): New target.
---
po/Makefile | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/po/Makefile b/po/Makefile
index 302c3b6..fdf8fa0 100644
--- a/po/Makefile
+++ b/po/Makefile
@@ -109,3 +109,14 @@ linguas: $(pofiles:$(podir)/%=%)
linguas.mo: $(pofiles:$(podir)/%.po=%.mo)
endif
+
+# Update translations from the translation project.
+TRANSLATIONS_URL = http://translationproject.org/latest/libc
+WGET = wget
+
+update-translations:
+ WGET -qO- $(TRANSLATIONS_URL) | sed -n 's|.*href="\([^"]\+po\)".*|\1|p' | \
+ while read f; do \
+ WGET -O $(objdir)/$$f-tmp $(TRANSLATIONS_URL)/$$f && \
+ mv -f $(objdir)/$$f-tmp $$f; \
+ done
--
2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Add target to incorporate translations from translations.org
2017-01-12 9:47 [PATCH] Add target to incorporate translations from translations.org Siddhesh Poyarekar
@ 2017-01-12 13:59 ` Joseph Myers
2017-01-12 14:12 ` Siddhesh Poyarekar
0 siblings, 1 reply; 3+ messages in thread
From: Joseph Myers @ 2017-01-12 13:59 UTC (permalink / raw)
To: Siddhesh Poyarekar; +Cc: libc-alpha
On Thu, 12 Jan 2017, Siddhesh Poyarekar wrote:
> +# Update translations from the translation project.
> +TRANSLATIONS_URL = http://translationproject.org/latest/libc
Should preferably use https.
> +WGET = wget
> +
> +update-translations:
> + WGET -qO- $(TRANSLATIONS_URL) | sed -n 's|.*href="\([^"]\+po\)".*|\1|p' | \
> + while read f; do \
> + WGET -O $(objdir)/$$f-tmp $(TRANSLATIONS_URL)/$$f && \
Does this actually work? I'd expect you to need to use $(WGET) not plain
WGET.
--
Joseph S. Myers
joseph@codesourcery.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Add target to incorporate translations from translations.org
2017-01-12 13:59 ` Joseph Myers
@ 2017-01-12 14:12 ` Siddhesh Poyarekar
0 siblings, 0 replies; 3+ messages in thread
From: Siddhesh Poyarekar @ 2017-01-12 14:12 UTC (permalink / raw)
To: libc-alpha
On Thursday 12 January 2017 07:29 PM, Joseph Myers wrote:
> On Thu, 12 Jan 2017, Siddhesh Poyarekar wrote:
>
>> +# Update translations from the translation project.
>> +TRANSLATIONS_URL = http://translationproject.org/latest/libc
>
> Should preferably use https.
OK.
>> +WGET = wget
>> +
>> +update-translations:
>> + WGET -qO- $(TRANSLATIONS_URL) | sed -n 's|.*href="\([^"]\+po\)".*|\1|p' | \
>> + while read f; do \
>> + WGET -O $(objdir)/$$f-tmp $(TRANSLATIONS_URL)/$$f && \
>
> Does this actually work? I'd expect you to need to use $(WGET) not plain
> WGET.
Ugh, I think I did that after the merge and did not test it, sorry :/
Siddhesh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-12 14:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-12 9:47 [PATCH] Add target to incorporate translations from translations.org Siddhesh Poyarekar
2017-01-12 13:59 ` Joseph Myers
2017-01-12 14:12 ` Siddhesh Poyarekar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).