From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id UC0dKXyr2F9WGwAA0tVLHw (envelope-from ) for ; Tue, 15 Dec 2020 12:26:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id mBj4JHyr2F9NPgAAB5/wlQ (envelope-from ) for ; Tue, 15 Dec 2020 12:26:36 +0000 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 69314940253 for ; Tue, 15 Dec 2020 12:26:36 +0000 (UTC) Received: from localhost ([::1]:51338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kp9PX-0004o9-8W for larch@yhetil.org; Tue, 15 Dec 2020 07:26:35 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kp9Ox-0004dr-75 for guix-devel@gnu.org; Tue, 15 Dec 2020 07:25:59 -0500 Received: from lepiller.eu ([2a00:5884:8208::1]:44358) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kp9Ou-00057a-6X for guix-devel@gnu.org; Tue, 15 Dec 2020 07:25:58 -0500 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 12f05608; Tue, 15 Dec 2020 12:25:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date :in-reply-to:references:mime-version:content-type :content-transfer-encoding:subject:to:from:message-id; s=dkim; bh=JPaHnnT45V8hQpvHjZC4OTEGmKLaIrl1l5PP/zCxK3o=; b=D34vJRWq1BI9 mQKG2RoYufwtquY0Bn3efRC5Nshm2lShBzRWQuokQ5EgqbZ7lR56Y4Vctc8VlCzS f9xDw8d/MXWkYhV7H1ImeP6GweiWtnKNL7n1/J/z0PDg/0r2oOZdq8bGjaNhci/Q aUrlO5PHKA9SoLPMRe/8TF3YGQ5MTSYqAHY1MotchpoYnPrPHbOMiQLRUGW3wCm2 SW9p30agqYLwDQk0hzTXWraTxxSpSBuCpNqeKz5CEFmg3IWFumUBQPV32jT4J46w CQVu80pz6NeAlB0QY2fVb0HRZ2gwTmwTdkZCt65+AtLw6JcxSaRWde4bgw2oL2X7 8AsTP6NwvQ== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 7187c931 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO); Tue, 15 Dec 2020 12:25:51 +0000 (UTC) Date: Tue, 15 Dec 2020 07:25:41 -0500 User-Agent: K-9 Mail for Android In-Reply-To: <86mtyf49x7.fsf@163.com> References: <86mtyf49x7.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----GBI9OBGYFXJ8MBNB7G0QHQC55T6F4H" Content-Transfer-Encoding: 7bit Subject: Re: Word order in Guix l10n To: guix-devel@gnu.org,Zhu Zihao From: Julien Lepiller Message-ID: Received-SPF: pass client-ip=2a00:5884:8208::1; envelope-from=julien@lepiller.eu; helo=lepiller.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.01 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=D34vJRWq; dmarc=pass (policy=none) header.from=lepiller.eu; spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Migadu-Queue-Id: 69314940253 X-Spam-Score: -3.01 X-Migadu-Scanner: scn0.migadu.com X-TUID: /dMTCAYY3Xir ------GBI9OBGYFXJ8MBNB7G0QHQC55T6F4H Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Even when translating to French, I sometimes feel the need to change word o= rder, but I end up finding a slightly unnatural way to preserve the order o= f arguments=2E I don't have an example at hand though=2E I don't know enough about guile to know how best to implement that (or if = that exists already)=2E Le 15 d=C3=A9cembre 2020 05:53:56 GMT-05:00, Zhu Zihao a =C3=A9crit : > >Hi, Guix users! > >Currently I'm putting my energy into Guix l10n(zh_CN)=2E However, there's >a serious flaw in current implementation of l10n=2E > >AFAFIK, Guix use format in (ice-9 format) to format the the template >string return by `G_`=2E The template string of (ice-9 format) looks >similar to the format template defined in ANSI CL, which only supports >format arguments **one by one**=2E > >In CJK languages, word order usually different from English=2E > >For example=2E consider message > > "could not find bootstrap binary '~a' for system '~a'" > >We mark first ~a as %1 and mark second as %2=2E It should be translated >into Chinese like this > > "=E6=97=A0=E6=B3=95=E6=89=BE=E5=88=B0=E7=94=A8=E4=BA=8E=E5=BC=95=E5=AF= =BC %2 =E7=B3=BB=E7=BB=9F=E7=9A=84=E4=BA=8C=E8=BF=9B=E5=88=B6=E6=96=87=E4= =BB=B6 %1" > >But currently it looks to be impossible because we can't refer >to positional argument in format template=2E > >My suggestions is we can create a new format function supports refer to >positional argument like > > (pos-format "~3 ~2 ~1" "foo" "bar" "baz") ;; =3D> "baz bar foo" > >And replace `format` in l10n with `pos-format` step by step=2E Maybe we >can create a function to combine `G_` and `format` so we can change its >implement detail without breaking existing code=2E > >Please leave your comment on my opinion, thanks :) > > >--=20 >Retrieve my PGP public key: > > gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F > >Zihao ------GBI9OBGYFXJ8MBNB7G0QHQC55T6F4H Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable Even when translating to French, I sometimes feel = the need to change word order, but I end up finding a slightly unnatural wa= y to preserve the order of arguments=2E I don't have an example at hand tho= ugh=2E

I don't know enough about guile to know how best to implement= that (or if that exists already)=2E

Le 1= 5 d=C3=A9cembre 2020 05:53:56 GMT-05:00, Zhu Zihao <all_but_last@163=2Ec= om> a =C3=A9crit :

Hi, Guix users!

Currently I'm putting my = energy into Guix l10n(zh_CN)=2E However, there's
a serious flaw in curre= nt implementation of l10n=2E

AFAFIK, Guix use format in (ice-9 forma= t) to format the the template
string return by `G_`=2E The template stri= ng of (ice-9 format) looks
similar to the format template defined in ANS= I CL, which only supports
format arguments **one by one**=2E

In C= JK languages, word order usually different from English=2E

For examp= le=2E consider message

"could not find bootstrap binary '~a' for s= ystem '~a'"

We mark first ~a as %1 and mark second as %2=2E It shoul= d be translated
into Chinese like this

"=E6=97=A0=E6=B3=95=E6= =89=BE=E5=88=B0=E7=94=A8=E4=BA=8E=E5=BC=95=E5=AF=BC %2 =E7=B3=BB=E7=BB=9F= =E7=9A=84=E4=BA=8C=E8=BF=9B=E5=88=B6=E6=96=87=E4=BB=B6 %1"

But curre= ntly it looks to be impossible because we can't refer
to positional argu= ment in format template=2E

My suggestions is we can create a new for= mat function supports refer to
positional argument like

(pos-fo= rmat "~3 ~2 ~1" "foo" "bar" "baz") ;; =3D> "baz bar foo"

And repl= ace `format` in l10n with `pos-format` step by step=2E Maybe we
can crea= te a function to combine `G_` and `format` so we can change its
implemen= t detail without breaking existing code=2E

Please leave your comment= on my opinion, thanks :)

------GBI9OBGYFXJ8MBNB7G0QHQC55T6F4H--