Open jfbu opened 3 months ago
Put all the strings in one file and write a console message style guide into that module's docstring.
Yeah at some point it would be nice to have consistent error messages... But if we change one, translation needs to be updated. Do we have a script that could update the po files when a punctuation like this changes..?
@picnixz It would be great to have such a tool, although I anticipate difficulties with non-Latin scripts where citing or quoting strings may be done differently. It seems to require suitable interfacing with transifex, but ping @shimizukawa.
IMO, it is possible to change all the translation catalogs at once, but it seems that some ingenuity is required to do so while maintaining the translated messages.
I think it is probably possible to achieve this by following the steps below.
tx
command of transifex-clienttx
command. At this point, there will be a duplicate of the old msgid and the new msgid on transifex.Recently, @rffontenelle did a great job fixing the automatic update of the translation catalog. It would be helpful if we could get @rffontenelle's opinion.
Languages might have different quotation marks, and might be hard for the maintainers/devs to keep without the guidance of a language team member. For instance, French uses guillemets. Brazilian Portuguese normally use double quotes instead of single quotes (although this is very flexible due to English influence).
My suggestion is to have writing style guide, reference it in the documentation, one of the Transifex admins make an in-Transifex announcement of the newly style guide so the translators are made aware. This way they can follow the guide as is or adjust to their case (e.g. French)
For the use of single quotes, it should be independent of the language actually. In french, the « » are used to quote text, but not to quote, e.g., an argument name. For quoting something like an argument name, I'd recommend either always using 'arg
' like in python or using `arg'
like in shell.
Here the quotes are relevant in the sense that they are markers, or HTML tags if you want (like <b>
) but they do not have the same meaning as in literature IMO.
Describe the bug
`foo`
,`foo'
, or'foo'
types in messages to user.For example
in
ext/intersphinx/_load.py
which has a consistent use of left ticks but also contains right ticks as inFile
ext/intersphinx/_resolve.py
for example contains usage of'%s'
Examples (in random order) in
config.py
showing all three styles:It is a bit complicated (to me) to grep for such things, I initially spotted some of them from looking at chains to translate then I explored a bit more.
Such things are not unexpected with as large a code-base as Sphinx, but maybe some guidelines could be set-up for contributions. Admission of guilt: did not search our issues first for similar ones...
Changing a posteriori may cause major disturbance as it may require massive re-translation work.
How to Reproduce
Use Sphinx and observe console output under various conditions :smiley:
Environment Information
Sphinx extensions
No response
Additional context
No response