From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: =?utf-8?Q?Etienne_Prud=E2=80=99homme?= Newsgroups: gmane.emacs.devel Subject: Re: Before l10n, better practices for (message) ? Date: Fri, 26 May 2017 17:57:06 -0400 Message-ID: <87o9uf703x.fsf@x230.lts> References: <2623E5C5-4D40-4C9F-BFF6-181D2E69F984@gmail.com> <831srgnuyc.fsf@gnu.org> <83vaormn2x.fsf@gnu.org> <1B4DE39C-E293-4370-9E76-82E1B7385C00@gmail.com> <83o9ugjaqd.fsf@gnu.org> <8737br8n4o.fsf@x230.lts> <83y3tjigk7.fsf@gnu.org> <87vaon77lo.fsf@x230.lts> <83wp93ifkz.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1495835840 5531 195.159.176.226 (26 May 2017 21:57:20 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 26 May 2017 21:57:20 +0000 (UTC) User-Agent: Emacs/25.2 (gnu/linux) Cc: jean.christophe.helary@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 26 23:57:16 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dENEQ-0001Ig-Ai for ged-emacs-devel@m.gmane.org; Fri, 26 May 2017 23:57:14 +0200 Original-Received: from localhost ([::1]:38686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dENEV-0001Qt-NP for ged-emacs-devel@m.gmane.org; Fri, 26 May 2017 17:57:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49779) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dENEP-0001MW-MC for emacs-devel@gnu.org; Fri, 26 May 2017 17:57:14 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dENEO-0007Gu-Tv for emacs-devel@gnu.org; Fri, 26 May 2017 17:57:13 -0400 Original-Received: from mail-it0-x244.google.com ([2607:f8b0:4001:c0b::244]:35421) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dENEL-0007GW-O3; Fri, 26 May 2017 17:57:09 -0400 Original-Received: by mail-it0-x244.google.com with SMTP id 67so2640648itx.2; Fri, 26 May 2017 14:57:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=57BJpflm/AwpRxkJiD04IkpPLeF6bmjwIy1AUDkDeMI=; b=RJBR121Hx+peW4v+qa5eQ8YTp/TH+axNBKdkH1GKEB9ubdbaIIWN16CGKSVX3dRHNs /ZcevZAZmVwYRe0Cw8Gq9AvKDbHIR/euXS+8zFgMlzKu+rCuCtY5zASzOpNYFeahnD/e FPXn6d4hwk0AE3eIe4QRAiYt8T1Ca8ai2aaSnBnsJiHZZvgm/04Q9oFIpBeHxzhvy2iP tGSH64Xpl5CEm1x+trQDIJfrJQEh9+hMq6PJu1kL+sK70aMyg8Odh0zOjKFGZWuy1pnE ZZt4VYwJfq91AyV7JnRgIr7waMLYcychQV35vXQr40IDtA+CQu7UKTNjVgAWP4gl/jBg qiCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=57BJpflm/AwpRxkJiD04IkpPLeF6bmjwIy1AUDkDeMI=; b=axUEkjJmbgYqYmG5ohkvRn/3sg4ztIaebakwCAXaxIAoQqm1Ei8Yjdv72PkQx4Nphh uG+zfO3MSG8sq7e/cOQeObj6vAnuFA1YPYlInz328T/mVVygWM/TmNs7e7COMt9KnUhH 6DgJSSILrnS0+ROjdZj03S/XJhHCkBDO+ePh6D+n/DMHagC1mcnD1i5HTr6WPQKZoBpx v3teRwK7+pRAv7zMZLgO04a+16KHVb6LJ+1W8rkE48ClMdgptu3Kc7Vk3GZC5gmNFWAD eRV1yGYwqaHPycf4vgqseWfklczSkhFR83EYrR8UuhakcOqZaWAKWYc74IGcmwqMpHhx jCZw== X-Gm-Message-State: AODbwcCSFa0QP+kFLZQf0RANx9anteMEtUfx0eGvx3JnepSCkNOy1aBi lQizV/HitslC9eBWhzU= X-Received: by 10.36.47.200 with SMTP id j191mr5232742itj.31.1495835828484; Fri, 26 May 2017 14:57:08 -0700 (PDT) Original-Received: from localhost (modemcable232.49-20-96.mc.videotron.ca. [96.20.49.232]) by smtp.gmail.com with ESMTPSA id g198sm4930939itb.29.2017.05.26.14.57.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 May 2017 14:57:07 -0700 (PDT) In-Reply-To: <83wp93ifkz.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 May 2017 22:27:24 +0300") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::244 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:215243 Archived-At: Eli Zaretskii writes: > Why not do this for every string that 'message' needs to display? I=E2=80=99m not sure to understand what you refer to every string? What I mean is something like this: > (let ((str "Hello %s World!") > (arg "you")) > (put-text-property 0 (length str) 'l10n 'hello-world str) > (message str arg)) Where message would try to fetch the =E2=80=98hello-world=E2=80=99 entry fr= om the translations registry if the configured language is not English. I might have been wrong that we=E2=80=99re not adding a function call, but = it=E2=80=99s still much simpler (I think) than using a library for that. I=E2=80=99m thinking of a text-property like =E2=80=98face=E2=80=99, but we= could call it =E2=80=98i10n=E2=80=99 (or =E2=80=98l18n=E2=80=99?) or anything more meaningful. -- Etienne Prud=E2=80=99homme