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 2MFGKeiV2F/wPAAA0tVLHw (envelope-from ) for ; Tue, 15 Dec 2020 10:54:32 +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 2AwUJeiV2F9IfQAAB5/wlQ (envelope-from ) for ; Tue, 15 Dec 2020 10:54:32 +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 56F849403AC for ; Tue, 15 Dec 2020 10:54:32 +0000 (UTC) Received: from localhost ([::1]:45148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kp7yR-0005RP-8k for larch@yhetil.org; Tue, 15 Dec 2020 05:54:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49156) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kp7yG-0005OT-C6 for guix-devel@gnu.org; Tue, 15 Dec 2020 05:54:20 -0500 Received: from mail-m975.mail.163.com ([123.126.97.5]:40464) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.90_1) (envelope-from ) id 1kp7yA-0007lz-Dx for guix-devel@gnu.org; Tue, 15 Dec 2020 05:54:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-ID:MIME-Version; bh=Cdv0b sxB9Lz1EkFKX+jzQ44ajrKGARNbK64BCEPvxik=; b=RTn9eIoKDiTb+d9le81R6 b1Nrm37mRnmCsO6EXzOIisK7snOJye/FXoquRmGwjUJ+OgoPNumKaG9a9RHfhPV1 4PG1W74e/ShLG7/Te3uqh7QSbo6hcWNvlUejzEABi5XTGLRmn8FyHxTxb7oUFcwN bvpvS5AcT/sR8npfi6PFqg= Received: from asus-laptop (unknown [27.39.88.42]) by smtp5 (Coremail) with SMTP id HdxpCgDXMojJldhf86umFQ--.145S2; Tue, 15 Dec 2020 18:54:03 +0800 (CST) User-agent: mu4e 1.4.13; emacs 27.1 From: Zhu Zihao To: guix-devel@gnu.org Subject: Word order in Guix l10n Date: Tue, 15 Dec 2020 18:53:56 +0800 Message-ID: <86mtyf49x7.fsf@163.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-CM-TRANSID: HdxpCgDXMojJldhf86umFQ--.145S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7Kw4DKw4fZF47Ar4kKw1DAwb_yoW8JF4Dpa 10kwnYyr4rtrnrGwn5GayfZF4aq3Z3GFy7XrW8C3y0yan8K3sa9F4Yga1av39rWry09ry7 Xw42vrn8Xw4qkaDanT9S1TB71UUUUUUqnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x07UAKs8UUUUU= X-Originating-IP: [27.39.88.42] X-CM-SenderInfo: pdoosuxxwbztlvw6il2tof0z/1tbiFAv7r1aD8YyG7gAAsL Received-SPF: pass client-ip=123.126.97.5; envelope-from=all_but_last@163.com; helo=mail-m975.mail.163.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=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: -5.11 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=163.com header.s=s110527 header.b=RTn9eIoK; dmarc=pass (policy=none) header.from=163.com; 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: 56F849403AC X-Spam-Score: -5.11 X-Migadu-Scanner: scn0.migadu.com X-TUID: k9OiZS+inms/ --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Guix users! Currently I'm putting my energy into Guix l10n(zh_CN). However, there's a serious flaw in current implementation of l10n. AFAFIK, Guix use format in (ice-9 format) to format the the template string return by `G_`. 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**. In CJK languages, word order usually different from English. For example. consider message "could not find bootstrap binary '~a' for system '~a'" We mark first ~a as %1 and mark second as %2. 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. 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. Maybe we can create a function to combine `G_` and `format` so we can change its implement detail without breaking existing code. Please leave your comment on my opinion, thanks :) =2D-=20 Retrieve my PGP public key: gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F Zihao --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIsEARYIADMWIQTUepyLKuOQW1Y9kTW+QrNSqfaCHwUCX9iVxBUcYWxsX2J1dF9s YXN0QDE2My5jb20ACgkQvkKzUqn2gh+wCwD/Wt608cmsqOcGUVYWxOSW0IvSpNR2 vtDGhGkRNRU0znEBAIzf6eRzClrKxaEL8BiJtDlmhEEHq+9FNQntJpIp30gC =xuH5 -----END PGP SIGNATURE----- --=-=-=--