Re: Add a new language [Valencian as a dialect of Catalan]

Antoni Bella Pérez via Docutils-develop <[email protected]>
Newsgroups gmane.text.docutils.devel
Organization P&S Lliure
Message-ID <2155044.irdbgypaU6@alba>
dilluns, 31 de juliol de 2023, a les 9:35:12 (CEST), Guenter Milde via 
Docutils-develop va escriure:
> Dear Toni, dear Docutils developers,
> 
> >> On Wed, 26 Jul 2023 Antoni Bella Pérez wrote:
> > 28 de juliol de 2023, engelbert gruber va escriure:
> On 2023-07-29, Antoni Bella Pérez wrote:
> >>>   I need help to decide what needs to be added to docutils so that
> >>> 
> >>> Valencian language be admitted as a language.
> >> 
> >> ca-va (ca_va for the module) ... looks good to me
> 
> I see a strong case for the `IETF language tag`_ "ca-valencia", with
> primary language subtag "ca" and the IETF-registered variant subtag
> "valencia". (I don't see how "ca-va" would fit in the `IETF language
> tag`_ syntax.)
> 
> .. _IETF language tag:
>     https://en.wikipedia.org/wiki/IETF_language_tag
> 
> >   'va' isn't any country, as a variant it should be 'ca-va' (without the
> > 
> > underscore), which is the translation of 'ca@va'.
> 
> We have to distinguish the tag used in the `language_code setting`_
> (which is also written to the HTML document) and the Python `language module
> name`_.
> 
> According to `BCP 47`_,
> 
>   A language tag is composed from a sequence of one or more "subtags",
>   [...]
>   distinguished and separated from other subtags in a tag by a hyphen
>   ("-", [Unicode] U+002D).
> 
>   ...
> 
>   There are different types of subtag, each of which is distinguished by
>   length, position in the tag, and content [...]
> 
>   ...
> 
>   [...] language tags and their subtags [...] are to be treated as case
>   insensitive
> 
> The `docutils.languages.LanguageImporter` selects a matching language
> module.
> 
> "Docutils Internationalization" describes how to get a matching Python
> `language module name`_:
> 
> * For case insensitivity, we use only lowercase in the module name.
> * Subtags are separated from primary tags by underscores instead of
>   hyphens to conform to Python naming rules.
> 
> 
> For Valencian, the module name would become ``ca_valencia.py``.
> 
> .. _language_code setting:
>    https://docutils.sourceforge.io/docs/user/config.html#language-code
> .. _language module name:
>   
> https://docutils.sourceforge.io/docs/howto/i18n.html#language-module-names
> .. _BCP 47:
>     https://www.rfc-editor.org/rfc/bcp/bcp47.txt
> 
> >   Can docutils support 'ca-va'?
> 
> Only, if "ca-valencia" is generally unacceptable and there is a
> convincing case and consensus for using "ca-va" instead.
> 
> With Docutils 0.20, the current LanguageImporter code, both "ca-valencia"
> and "ca-va" can be used and automatically selects the Catalan language
> module(s) ``ca.py``. The "html5" writer uses the "language-code" setting
> unchanged, e.g.::
> 
>   <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ca-va" lang="ca-va">
> 
> >   Note you that if the country is added it would be 'ca-va_es' (it is only
> > 
> > presented in order to understand the subject) which is not desired by any
> > side.
> 
> Note, that with "ca-valencia", the canonical IETF tag including would
> become "ca-ES-valencia" as the subtag order is fixed and "variant" comes
> after "region".
> 
> Docutils would look for "ca_es_valencia", "ca_es.py", "ca_valencia.py",
> and "ca.py" language module(s) and use the first match.
> 
> >>> language be admitted as a language. As a note, I would like to state
> >>> 
> >>> that we reuse Catalan as much as possible:
> >>>   - The 'ca' translations in docutils too - no need to touch them
> 
> ...
> 
> >>>   With all this, how do you see it?
> 
> If there is no difference between Catalan and Valencian in the
> translations in "docutils/languages/ca.py" and
> "docutils/parsers/rst/languages/ca.py", using "ca-va" or "ca-valencia"
> should work out of the box since Docutils 0.10 (2012-12-16).
> 
> >>>   The reason is to be able to generate content with Sphinx.
> 
> I cannot tell about the Sphinx language features.
> 
> 
> Hope this helps,
> 
> Günter
> 

 Hi Günter and developers, thanks to all for your time

  Now, I prefer to use 'ca_valencia' in the docutils to follow the standard 
and, I will initiate the requirement within the Valencian community to make 
the change to two letters in the IETF.

  Can you enable it? 'Catalan (Valencian)' - 'ca_valencia'

  In Sphinx they have the requirement that the language be supported in the 
docutils, it won't be a problem.

  Remember: #203 Catalan updates https://sourceforge.net/p/docutils/patches/
203/ 

  Regards
  Toni
-- 
Dubta que les estrelles siguin foc.
Dubta que el Sol es mogui.
Dubta que la veritat sigui mentida.
Però no dubtis mai que t'estimo.
	- William Shakespeare

No se n'ha de posar massa
	- A grandmother on the TV show "Las recetas de Julie"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.