From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c75fd3043cfdcb58 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.105.38 with SMTP id gj6mr1149612wib.0.1343838497767; Wed, 01 Aug 2012 09:28:17 -0700 (PDT) Path: q11ni28712301wiw.1!nntp.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.musoftware.de!wum.musoftware.de!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Formatted IO - Fortran style or similar. Date: Wed, 01 Aug 2012 17:28:16 +0100 Organization: A noiseless patient Spider Message-ID: References: <50164ad8$0$1156$5b6aafb4@news.zen.co.uk> <501706ca$0$1151$5b6aafb4@news.zen.co.uk> <87lii06t5t.fsf@adaheads.sparre-andersen.dk> <87boivrq3a.fsf@adaheads.sparre-andersen.dk> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="edf2659fbb8cb6d4b5f62db4b36ac1e6"; logging-data="18117"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+25urqu7gcEFBQPOFxp1ske34RwOkbDsk=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (darwin) Cancel-Lock: sha1:fHPC8nnW+JZbrg8JX2UYlpmWKeI= sha1:MCGkCuBH6tLFGX/dmP+mimBC48Q= Content-Type: text/plain Date: 2012-08-01T17:28:16+01:00 List-Id: Jacob Sparre Andersen writes: > stefan-lucks@see-the.signature writes: >> On Tue, 31 Jul 2012, Jacob Sparre Andersen wrote: > >>> How would you handle translatable user visible strings - such as >>> "Parsing '${file_name}' failed on line ${line_number}." (where >>> "${...}" identifies parameter substitutions) - in Ada? >> >> Why do you need to *substitute* the parameters in the string at all? >> >> Without substitution, the following seems to work fine: >> >> Ada.Text_IO.Put_Line("Parsing " & File_Name & >> " failed on line " & To_String(Line_Number) & >> "."); > > Yes. But how do you translate that text without having to recompile > the whole application? > > My question was related to _translatable_ user visible strings. If I > just want to make an all-American program, your proposed solution is > fine, but when I want to make it easy to translate the user visible > strings in an application you proposed solution is unacceptable. Exactly so. From the GNU gettext manual[1], Entire sentences are also important because in many languages, the declination of some word in a sentence depends on the gender or the number (singular/plural) of another part of the sentence. There are usually more interdependencies between words than in English. The consequence is that asking a translator to translate two half-sentences and then combining these two half-sentences through dumb string concatenation will not work, for many languages, even though it would work for English. That's why translators need to handle entire sentences. [1] http://www.gnu.org/software/gettext/manual/gettext.html#Preparing-Strings