URL:
  <http://gna.org/patch/?2064>

                 Summary: Utility: format natural language list from strvec
                 Project: Freeciv
            Submitted by: jtn
            Submitted on: Tuesday 10/12/10 at 21:31
                Category: None
                Priority: 5 - Normal
                  Status: Need Info
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: 

    _______________________________________________________

Details:

Follow-on from bug #16847 / patch #2056:

There are a number of places, mostly in on-line help, where there are
repeated code patterns to take a list of strings and format it as a list in a
single string, suitable for inclusion in a sentence ("foo, bar or baz"). It
might be useful to centralise this in a single utility function or
functions.

For one thing, this could centralise handling of i18n issues. However, I'm
not sure what exactly the issues are.

At a minimum we'd need variants for "or"-separated lists and "and"-separated
lists. Currently each of these has two strings: *"?or:, "* and *" or "* (and
the equivalent for "and").

Is that enough strings? I could imagine a use for three strings instead: one
for a two-element list "foo* or *bar", and two for longer lists: "foo*, *bar*
or *baz". This would allow use of the serial comma ("foo or bar" and "foo,
bar, or baz"), but I don't know if there are languages where that's
particularly important.

Also, do we need separate i18n marking for, say, lists of nouns (such as unit
types) and adjectives (such as unit marking)? They're the same in English,
but...

There are loads of other markings that could potentially use this library
"?clistmore:, %s", "?clistlast:, and %s", "?blistmore:, ", etc, but I don't
know if they've been put in for specific i18n issues so I don't know whether
it's safe to merge them.




    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?2064>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to