From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id IGIMNQB+KGLS8QAAgWs5BA (envelope-from ) for ; Wed, 09 Mar 2022 11:14:24 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id EMALLgB+KGLOagEAG6o9tA (envelope-from ) for ; Wed, 09 Mar 2022 11:14:24 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 504772490B for ; Wed, 9 Mar 2022 11:14:24 +0100 (CET) Received: from localhost ([::1]:39432 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRtKp-0004pT-59 for larch@yhetil.org; Wed, 09 Mar 2022 05:14:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56832) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRtJW-0002nq-7d for guix-patches@gnu.org; Wed, 09 Mar 2022 05:13:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRtJV-0004o9-VM for guix-patches@gnu.org; Wed, 09 Mar 2022 05:13:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nRtJV-0003JJ-Iw for guix-patches@gnu.org; Wed, 09 Mar 2022 05:13:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#54302] [PATCH] nls: Implement translation thresholds. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 09 Mar 2022 10:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 54302 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Julien Lepiller Cc: 54302@debbugs.gnu.org Received: via spool by 54302-submit@debbugs.gnu.org id=B54302.164682074212638 (code B ref 54302); Wed, 09 Mar 2022 10:13:01 +0000 Received: (at 54302) by debbugs.gnu.org; 9 Mar 2022 10:12:22 +0000 Received: from localhost ([127.0.0.1]:58594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRtIo-0003Hh-42 for submit@debbugs.gnu.org; Wed, 09 Mar 2022 05:12:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50962) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRtIm-0003HP-I2 for 54302@debbugs.gnu.org; Wed, 09 Mar 2022 05:12:17 -0500 Received: from [2001:470:142:3::e] (port=32890 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRtIg-0004jx-RD; Wed, 09 Mar 2022 05:12:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=gEVBty5DqQXVDrvy2NPVaoxxq5hqZuBGm4J2zNmwHTs=; b=YuaBqen/XCNOGR8zzhHC 83bvmZWYKvHBYy2MN+n/HDSbLgeYg9U9t7suX2A21EJh7wMyxCsucM2zNcl1KAGRzfvPc0KiDO/a2 bSUk5QePY4Pu9BvOAp6ebEGeYCwkdAhRhxLMN48OeDrwE3MnY7PUtzyIWPD7IgcJ1EIowvXncvgyX ge1yLGm2uBhgQecUo4o8N3XnAoe7i56kkxAIJtFDuxtFs64x2JuW2/8CFG/nQAqXifQ6PeOtdJIlo B/lPQIEAGlYhjwz1ly0QZTNtSfL7RNTnEFzo0ZYJa+lOFYZ7SdPV0G7pkNClsR4zEkOYcTJygsOGa epE2Zg3bAPr5Kw==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201]:50308 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRtIg-0002gK-61; Wed, 09 Mar 2022 05:12:10 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20220308192251.20094828@tachikoma.lepiller.eu> Date: Wed, 09 Mar 2022 11:12:07 +0100 In-Reply-To: <20220308192251.20094828@tachikoma.lepiller.eu> (Julien Lepiller's message of "Tue, 8 Mar 2022 19:22:51 +0100") Message-ID: <8735jr4eq0.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646820864; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=gEVBty5DqQXVDrvy2NPVaoxxq5hqZuBGm4J2zNmwHTs=; b=ijJ/LCxDzj+d3CblJccfFhvXqhdhvVc42LPQNnV43L4TxQmJ60iXyZN8DnWhchDBqo3Nb5 TZav5ckHR9RSWZ/BpmXxvP6s4Aj4cFxjrWa0tUv7o1N/WCzXCXhwWolLDFnhwS29/FKCNc Tdptf6xff/ZUsyRTwP2k32Am1v8/JOT9Sz+Zkk45ZFg4ZA5I0o1S7x5ENKB/KPMpFjDYur FlLxWtO9fhgoEdbWmYW8MxcCU5bHTAp/805InzVIFt8T2H5VV5Ege1YRXLLotPbdZpVgqb tBeKhceiqDfEFwWZy6veRy9ER+pdMfxapy9E2A1Ri9EvE+dzOUGQ/xDMMZC6uw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646820864; a=rsa-sha256; cv=none; b=EmyZ4iXFS4tJxmIBEA6QCDUVhHC5AiFRdh9tMf61zIBvHujMk798IVO5WqBAoatR2/Z+NE J+SvD/WucsLabM3OeKJ1yXTvBmCYtojJ6GS7sNl7DvQA9jwHuUDZR1A2j3OGGKRxtJsdzt NAXvP9s+p7QDPwsqNF1Kac43kRcp9195fhbaFqW1SgIbSUaMp03mwJ/mrkJZ09u5SZUTeH yNhriVtsx6OoegiKoqyca5wHT8gae9a6/FmFZ4XaIeJaMbYQUz9JT8BZ5ZCw1gCNba7XWR TElweH1YTOcY5Qy4AHhOGVIguBv/6XIIbkyjnzZKsVymkfLBRwklAuVFXKG2fg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="YuaBqen/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.12 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b="YuaBqen/"; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 504772490B X-Spam-Score: -3.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: ubUvesqh1pPV Hi! Julien Lepiller skribis: > manual and cookbook: only include new languages when they reach 10% > completion. Remove languages when they fall below 5%. SGTM (or even 15%/10%). > website (unrelated to this repo, but still important): only include new > languages when they reach 80% completion. Remove languages when they > fall below 60%. The reason for the higher threshold is that the website > acts as some sort of advertisement, so we want a higher quality than > half English half translated. SGTM. >>>From 37071410629a7d70c9b4e4f673f2c625d3ed4b47 Mon Sep 17 00:00:00 2001 > Message-Id: <37071410629a7d70c9b4e4f673f2c625d3ed4b47.1646763369.git.juli= en@lepiller.eu> > From: Julien Lepiller > Date: Tue, 8 Mar 2022 13:14:58 +0100 > Subject: [PATCH 1/3] doc: Document inclusion requirements for new > translations. > > * doc/contributing.texi (Translating Guix)[Conditions for Inclusion]: > New section. [...] > +There are no conditions for adding new translations of the guix and > +guix-packages components, other than they need at least one translated @code{guix} and @code{guix-packages} > +Given that the website is dedicated to new users, we want its translation =E2=80=9Cweb site=E2=80=9D (two words). > +target. Everytime we synchronise translations, developpers need to =E2=80=9Cdevelopers=E2=80=9D and (if you feel overseas-inclined) =E2=80=9Cs= ynchronize=E2=80=9D. > +When a language is included, it may be removed in the future, if it stays Remove comma. >>>From 5cbb70ebcbf141cd05fa60bf0bfa806125a56381 Mon Sep 17 00:00:00 2001 > Message-Id: <5cbb70ebcbf141cd05fa60bf0bfa806125a56381.1646763369.git.juli= en@lepiller.eu> > In-Reply-To: <37071410629a7d70c9b4e4f673f2c625d3ed4b47.1646763369.git.jul= ien@lepiller.eu> > References: <37071410629a7d70c9b4e4f673f2c625d3ed4b47.1646763369.git.juli= en@lepiller.eu> > From: Julien Lepiller > Date: Tue, 8 Mar 2022 19:11:38 +0100 > Subject: [PATCH 2/3] maint: Implement translation thresholds. > > Do not download new translations for the cookbook and the manual when > they are below 10% completion, and remove existing translations when > they fall below 5%. > > * Makefile.am (download-po): Implement translation thresholds. > --- > Makefile.am | 20 +++++++++++++++++--- > 1 file changed, 17 insertions(+), 3 deletions(-) > > diff --git a/Makefile.am b/Makefile.am > index 8850c4562c..164804d96a 100644 > --- a/Makefile.am > +++ b/Makefile.am > @@ -1066,21 +1066,35 @@ WEBLATE_REPO =3D https://framagit.org/tyreunom/gu= ix-translations > # form. > download-po: > dir=3D$$(mktemp -d); \ > - git clone --depth 1 "$(WEBLATE_REPO)" "$$dir/translations"; \ > + git clone --depth 1 "$(WEBLATE_REPO)" "$$dir/translations" && \ > for domain in po/doc po/guix po/packages; do \ > for po in "$$dir/translations/$$domain"/*.po; do \ > translated=3D$$(LANG=3Den_US.UTF-8 msgfmt --statistics "$$po" 2= >&1 | cut -f1 -d' '); \ > + untranslated=3D$$(LANG=3Den_US.UTF-8 msgfmt --statistics "$$po"= 2>&1 | cut -f4 -d' '); \ > + untranslated=3D$${untranslated:-0}; \ > + total=3D$$(($$translated+$$untranslated)); \ > target=3D$$(basename "$$po"); \ > target=3D"$$domain/$$target"; \ > - if msgfmt -c "$$po" && [ "$$translated" !=3D "0" ]; then \ > + msgfmt -c "$$po"; \ > + if msgfmt -c "$$po" && [ "$$translated" !=3D "0" ] && ([ "$$dom= ain" !=3D "po/doc" ] || [ "$$translated" -gt $$(($$total/10)) ] || [ -f $$t= arget ]); then \ > msgfilter --no-wrap -i "$$po" cat > "$$po".tmp; \ > mv "$$po".tmp "$$target"; \ > echo "copied $$target."; \ > else \ > - echo "WARN: $$target ($$translated translated messages) was= not added/updated."; \ > + echo "WARN: $$target ($$translated translated messages ($$(= (translated/total*100))%)) was not added/updated."; \ > fi; \ > done; \ > done; \ > + for po in po/doc/*.po; do \ > + translated=3D$$(LANG=3Den_US.UTF-8 msgfmt --statistics "$$po" 2>&1 = | cut -f1 -d' '); \ > + untranslated=3D$$(LANG=3Den_US.UTF-8 msgfmt --statistics "$$po" 2>&= 1 | cut -f4 -d' '); \ > + untranslated=3D$${untranslated:-0}; \ > + total=3D$$(($$translated + $$untranslated)); \ > + if [ "$$translated" -lt "$$(($$total/20))" ]; then \ > + echo "WARN: $$po was removed because it is below the 5% threshold:= $$((translated/total*100))%"; \ > + rm $$po; \ > + fi; \ > + done; \ LGTM, but this is getting a bit hairy. :-) No concrete suggestions, but it would be great if we could somehow split it and/or move it to a script in build-aux/ (that=E2=80=99d avoid double do= llar signs) and/or write it in Scheme. Future work=E2=80=A6 > From 726ef94f91d5dab25c3ccfb2986dcba6d39a4ab8 Mon Sep 17 00:00:00 2001 > Message-Id: <726ef94f91d5dab25c3ccfb2986dcba6d39a4ab8.1646763369.git.juli= en@lepiller.eu> > In-Reply-To: <37071410629a7d70c9b4e4f673f2c625d3ed4b47.1646763369.git.jul= ien@lepiller.eu> > References: <37071410629a7d70c9b4e4f673f2c625d3ed4b47.1646763369.git.juli= en@lepiller.eu> > From: Julien Lepiller > Date: Tue, 8 Mar 2022 19:14:47 +0100 > Subject: [PATCH 3/3] nls: Enforce translation thresholds. > > * po/doc/guix-cookbook.es.po: Remove file. > * po/doc/guix-cookbook.fa.po: Remove file. > * po/doc/guix-cookbook.fi.po: Remove file. > * po/doc/guix-cookbook.uk.po: Remove file. > * po/doc/local.mk: Remove them. > * doc/local.mk: Remove them. [...] > # If adding a language, update the following variables, and info_TEXINFO= S. > MANUAL_LANGUAGES =3D de es fa fi fr it ko pt_BR ru sk zh_CN > -COOKBOOK_LANGUAGES =3D de es fa fi fr ko pt_BR ru sk uk zh_Hans > +COOKBOOK_LANGUAGES =3D de fr ko pt_BR ru sk zh_Hans Should we also remove fa, fi, it, ko, and sk from MANUAL_LANGUAGES and info_TEXINFOS? https://translate.fedoraproject.org/projects/guix/documentation-manual/ Thank you! Ludo=E2=80=99.