Giter Club home page Giter Club logo

sphinx-doc-translations's People

Contributors

aa-turner avatar dependabot[bot] avatar jdillard avatar rffontenelle avatar shimizukawa avatar tk0miya avatar tkoyama010 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sphinx-doc-translations's Issues

Clean multiple Serbian teams in Transifex and readthedocs

It came to my attention that sphinx-doc organization in Transifex has 3 Serbian teams: Serbian (sr), Serbian from Serbia (sr_RS) and Serbian Latin.

Regarding RTD projects there are only 2: Serbian (sr) and Serbian from Serbia (sr_RS).

In the official docs website, there is only 1: Serbian (sr). Serbian from Serbia (sr_RS)'s sphinx-sr-rs.readthedocs.io is redirected to Serbian (sr).

Only the first one (sr) has more translations and all contributors from other teams are part of the first one.

How about remove from Transifex the Serbian from Serbia (sr_RS) and Serbian Latin teams, and from Read the Docs the Serbian from Serbia (sr_SR) ?

Tasks:

  • Remove sr@latin and sr_RS from Transifex
  • Remove sr_RS from this repository
  • Remove readthedocs project

/cc @AA-Turner

Tamil translation 100% overnight with syntax errors

Last night I approved the request for Tamil language and made the requester a translator role in that team. Today it reached 100% translation for the whole Sphinx docs, and a quick look in the translation strings seems to show Sphinx syntax errors all over the strings to what seems to be machine translation applied to all strings.

For instance, see below screenshot of the view of the Tamil strings of all resources of Sphinx docs. Notice how Ubuntu package names were translated when shouldn't, :confval:`latex_enginge` was translated when shouldn't, etc..

image

My question is what should be done in this case?

EDIT: note that Tamil translation is not being pulled to Sphinx docs yet, because locale/update.sh pull selected languages.

cc @AA-Turner @shimizukawa

Set placeholders on Transifex

Transifex has this nice feature of setting custom placeholders that make translators job easier as it highlights the placeholders which can be copied to translation with Ctrl+Alt+NUMBER (1, 2.. n placeholders in the same screen).

According to Transifex's documentation, this can be set in:

  1. Go to https://www.transifex.com/sphinx-doc/settings/validations/
  2. Expand PO File (.po, .pot) checks
  3. Last item, mark it as Warning (middle, yellow icon)
  4. Click the Set up custom placeholders link in the same item
  5. Set placeholders in the displayed dialog.

Now, which placedholders should be set? First of all, there is the literal ``something`` (double backticks) which is very common, hence deserves being a placeholder

Also there are other domains that are very common, and I feel they deserve being added. Maybe not all have to added, but the most common would be interesting to be set as custom placeholder, in my opinion. See below the full list of domains used in sphinx docs, preceeded by the number of occurrences.

NOTE: using confval as an example, :confval:` (adding a backtick after the colon) would be a good "starts with" expression, having ` as "ends with" expression in the Transifex's dialog for creating custom placeholders.

    641 :confval:
    338 :rst:dir:
    223 :ref:
    183 :file:
    127 :mod:
    112 :program:
    112 :meth:
    104 :doc:
    101 :dudir:
    100 :rst:role:
     97 :class:
     55 :term:
     49 :event:
     39 :command:
     35 :option:
     35 :func:
     18 :data:
     18 :attr:
     16 :dfn:
     14 :cpp:expr:
     13 :durole:
     11 :py:class:
     10 :samp:
      9 :exc:
      8 :manpage:
      6 :cpp:func:
      5 :py:meth:
      5 :kbd:
      5 :guilabel:
      5 :duref:
      4 :strong:
      4 :py:mod:
      4 :download:
      3 :py:data:
      2 :py:obj:
      2 :py:attr:
      2 :pep:
      2 :obj:
      2 :math:
      2 :literal:
      2 :envvar:
      2 :cpp:var:
      2 :cpp:texpr:
      2 :c:var:
      2 :c:texpr:
      2 :c:macro:
      2 :c:expr:
      1 :cpp:type:
      1 :code:

For the record, I've got the above list using the (ugly, improvised) command below and cleaning a little bit some false-positive occurrences:

egrep ':([a-z]+):' $(find -name '*.pot') | sed 's| :|\n:|g;s|msgid ":|\n:|g;s|` |`\n|g;s|`"$|`\n|g;s|`,|`\n|g;s|`\\\\|`\n|g;s|`\.|`\n|g;' | grep '^:' | cut -d\` -f1 | sort | uniq -c | sort -r

EDIT: Also deserves being added as placeholder: [#_]

Leftover po files ?

Hi,

Starting to work on the Internationalization page, a link to an XKCD page (always nice to found BTW ;) ), by luck at the top of it, made me realize I wasn't working on the good resource !
Quick search in Transifex editor showed me two resources: intl and usage--advanced--intl, and another one here in the repository that this may not be the only duplicate...
Looks like a bit of housekeeping is missing somewhere in the pipeline :)

Translations updates not published

Hi,

First and foremost, thanks for setting this up !
I have started working on French translation yesterday but just discovered that updates don't seem to be published :'(

Is this because of the conf.py issue ?
Is there any way to circumvent it ?

TY
J

Ubuntu deprecation warning in Actions

main.yml workflow actions are showing the following warning:

The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Coming from:

echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")"
echo "::set-output name=yyyymm::$(/bin/date -u "+%Y%m")"

According to https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/, it look like it should be:

- echo "::set-output name=date::$(/bin/date -u "+%Y%m%d")" 
- echo "::set-output name=yyyymm::$(/bin/date -u "+%Y%m")" 
+ echo "date=$(/bin/date -u "+%Y%m%d")" >> $GITHUB_OUTPUT
+ echo "yyyymm=$(/bin/date -u "+%Y%m")" >> $GITHUB_OUTPUT

Let us have custom placeholders in Transifex

It would really nice to have custom placeholders to ease Sphinx documentation translation.

Adding custom placeholders causes the matched expression to be highlighted, be assigned unique numbers in that string, and to be warned if translation differs from the source string. I use it a lot in Python docs translation in Transifex, and I highly recommend to Sphinx docs.

Example of placeholders set in Python docs:

Setting this requires:

  • someone with organization admin role in Transifex, which I don't have and reason why I'm bringing this up.
  • to find out every rst roles used in the documentation
  • to set each placeholdler in Transifex, one by one

I might have found some commands to print the candidates for custom placeholders:

# Run this from this project root directory
# Generate 'strings.txt' with the whole-line of all translation strings
for pot in $(find locale/pot -name "*.pot"); do (msgcat --no-wrap $pot > tmp; mv tmp $pot;); done
grep -h ^msgid $(find locale/pot -name "*.pot") | sed 's|^msgid "||;s|"$||;/^$/d' > strings.txt
git checkout locale/

# Find roles with two parts like :c:macro:`something`.
grep -Po '(^|\s+):([\w\-\_\~]*:){2}`' strings.txt | sed -E 's|^ +||;' | sort -u

# Find roles with only one part like :doc:`something` 
grep -Po '(^|\s+):[\w\-\_\~]*:`' strings.txt | sed -E 's|^ +||;' | sort -u

# Take not of the command-line arguments like ``-j`` (but will not use this output)
grep -Po '``-[\w\s\-\_ ]*``' strings.txt

# Also a placeholder starting with `` and ending with `` should also be added

# Find project-specific variables like "|today|" (prints nothing, but let's leave this documented):
grep -Po '|[\w\_\-]*|' strings.txt

These commands will print these:

Starting pattern for two-part roles (ending pattern is `)
$ grep -Po '(^|\s+):([\w\-\_\~]*:){2}`' strings.txt | sed -E 's|^ +||;' | sort -u
:c:macro:`
:cpp:expr:`
:cpp:type:`
:py:class:`
:py:data:`
:py:func:`
:py:meth:`
:py:mod:`
:py:obj:`
:rst:dir:`
:rst:role:`
Starting pattern for one-part roles (ending pattern is `)
$ grep -Po '(^|\s+):([\w\-\_\~]*:)`' strings.txt | sed -E 's|^ +||;' | sort -u
:abbr:`
:attr:`
:class:`
:code:`
:command:`
:confval:`
:data:`
:dfn:`
:doc:`
:download:`
:dudir:`
:duref:`
:durole:`
:envvar:`
:event:`
:exc:`
:file:`
:func:`
:guilabel:`
:kbd:`
:literal:`
:mailheader:`
:makevar:`
:manpage:`
:math:`
:menuselection:`
:meth:`
:mimetype:`
:mod:`
:newsgroup:`
:obj:`
:option:`
:pep:`
:PEP:`
:program:`
:ref:`
:regexp:`
:rfc:`
:samp:`
:strong:`
:term:`
Starting pattern for command-line arguments and literal text (ending pattern is ``)
``--
``-
``
  

Some Chinese translations confused me

I came from sphinx doc, autosummary section.

Some translation results confused me. Like following one.

Chinese result:

:文件:`autosummary/基准.rst`

English source:

:file:`autosummary/base.rst`

I thought :file: is a mark and base.rst is a specific file name, it shouldn't translate.
If they were translated, they couldn't be understood well.
So just keep the origin is fine, like this.

":file:`autosummary/base.rst` -- 回退模板" 

And I found there have the same problems in other places.

#: ../../sphinx/doc/usage/extensions/autosummary.rst:231
msgid ":file:`autosummary/base.rst` -- fallback template"
msgstr ":文件:`autosummary/基准.rst`--回退模板"
#: ../../sphinx/doc/usage/extensions/autosummary.rst:232
msgid ":file:`autosummary/module.rst` -- template for modules"
msgstr ":文件:`autosummary/模块.rst`--模块模板"
#: ../../sphinx/doc/usage/extensions/autosummary.rst:233
msgid ":file:`autosummary/class.rst` -- template for classes"
msgstr ":文件:`autosummary/类rst`--类模板"
#: ../../sphinx/doc/usage/extensions/autosummary.rst:234
msgid ":file:`autosummary/function.rst` -- template for functions"
msgstr ":文件:`autosummary/函数.rst`--函数模板"
#: ../../sphinx/doc/usage/extensions/autosummary.rst:235
msgid ":file:`autosummary/attribute.rst` -- template for class attributes"
msgstr ":文件:`autosummary/属性.rst`--类属性模板"
#: ../../sphinx/doc/usage/extensions/autosummary.rst:236
msgid ":file:`autosummary/method.rst` -- template for class methods"
msgstr ":文件:`autosummary/方法.rst`--类方法模板"

Resources names as POT filename instead of the resource slug

Newly-added docs-related resources were created using POT filename as the resource name. That's a bug in sphinx-intl. Transifex organization admin, please fix the resource name to be equal to the resource slug, just like the rest of this project's resources.

Resource name Resource slug
c.pot usage--domains--c
cpp.pot usage--domains--cpp
index.pot usage--domains--index
javascript.pot usage--domains--javascript
mathematics.pot usage--domains--mathematics
python.pot usage--domains--python
standard.pot usage--domains--standard
restructuredtext.pot usage--domains--restructuredtext

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.