Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancements to gettext docs #54745

Closed
merwok opened this issue Nov 26, 2010 · 11 comments
Closed

Enhancements to gettext docs #54745

merwok opened this issue Nov 26, 2010 · 11 comments
Assignees
Labels
3.7 (EOL) end of life 3.8 only security fixes docs Documentation in the Doc dir

Comments

@merwok
Copy link
Member

merwok commented Nov 26, 2010

BPO 10536
Nosy @warsaw, @merwok, @serhiy-storchaka, @matrixise, @andy-maier, @JulienPalard, @miss-islington
PRs
  • bpo-10536: Enhancements to gettext docs #10324
  • [3.7] bpo-10536: Enhancements to gettext docs (GH-10324) #13224
  • Files
  • gettext-docs-1.diff
  • bpo-10536.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/merwok'
    closed_at = <Date 2019-05-09.20:26:53.235>
    created_at = <Date 2010-11-26.00:22:03.136>
    labels = ['3.7', '3.8', 'docs']
    title = 'Enhancements to gettext docs'
    updated_at = <Date 2019-05-09.20:26:53.235>
    user = 'https://github.com/merwok'

    bugs.python.org fields:

    activity = <Date 2019-05-09.20:26:53.235>
    actor = 'mdk'
    assignee = 'eric.araujo'
    closed = True
    closed_date = <Date 2019-05-09.20:26:53.235>
    closer = 'mdk'
    components = ['Documentation']
    creation = <Date 2010-11-26.00:22:03.136>
    creator = 'eric.araujo'
    dependencies = []
    files = ['19819', '47904']
    hgrepos = []
    issue_num = 10536
    keywords = ['patch', 'needs review']
    message_count = 11.0
    messages = ['122420', '145218', '145226', '222166', '328642', '329251', '329252', '329258', '329270', '329279', '341998']
    nosy_count = 9.0
    nosy_names = ['barry', 'eric.araujo', 'docs@python', 'python-dev', 'serhiy.storchaka', 'matrixise', 'andymaier', 'mdk', 'miss-islington']
    pr_nums = ['10324', '13224']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue10536'
    versions = ['Python 2.7', 'Python 3.6', 'Python 3.7', 'Python 3.8']

    @merwok
    Copy link
    Member Author

    merwok commented Nov 26, 2010

    A patch made for bpo-2504 revealed a bug in gettext.rst, and I’ve found a number of other things to change in the file. This is the first patch of a series of two or three.

    Barry, as the original author of the module and doc, I’d like your opinion on points 3, a, and b particularly.

    Patch is also uploaded to Rietveld for greater convenience: http://codereview.appspot.com/3333042/ (upload.py rocks)

    Summary:

    1. Markup: Use modern class/method directives combo (yay DRY). Mark up variable parts in :file: constructs (e.g. :file:`{domain}.mo` will cause the HTML output to use var to indicate replaceable text). Also change some ``gettext`` to :program:`gettext` for consistency.

    2. Fix a typo in lngettext doc (originally included in patch by Franz Glasner for bpo-2504).

    3. I had started to remove information about private attributes (_info, _charset), advertising public getter methods instead. Then I read the description of NullTranslations and realized the information was needed for subclasses. I’ve reverted my removals, but I still think the private attributes should be listed in a specific section for people writing subclasses and not in the rest of the text. If you’re okay, I’ll make a second patch.

    4. Assorted wording changes, missing periods and hyphens, and other very small touch-ups: Turned a broken bare link into a working link with nice text; used the with statement in an example (we all love the with statement!); used two spaces after periods throughout (hello Fred Drake).

    Final note: lines have not been rewrapped, for diff clarity. When I commit part or all of this patch, I’ll make another commit to rewrap.

    Not addressed:
    a) The current docs is currently POSIX-specific.

    b) The docs take great care to explain that Unicode strings will be returned in different places, but this should not be so accented in 3.x docs IMO. I would just put a note somewhere near the top that all strings are str and remove the redundant sentences. Following that line of thought, I could group all l*gettext variants at the end of the list of methods, explaining that regular usage should just be happy with str objects and that l*gettext are available if people really want bytes.

    c) The file uses “built-in namespace” and “builtins namespace”, sometimes in neighbor paragraphs. :mod:`builtins` is not used, even in explanations of the install function/method. I don’t know if I should change that.

    d) Some capitalization patterns look strange to me: I have seen “I18N” and “L10N” in upper case nowhere else. Similarly, lower-case “id” looks stranger than “ID”. The latter is used for example in official GNU gettext docs. Am I going into foolish consistency territory or not?

    Thanks in advance for reviews and opinions.

    @merwok merwok self-assigned this Nov 26, 2010
    @merwok merwok added the docs Documentation in the Doc dir label Nov 26, 2010
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 9, 2011

    New changeset e48e6e9bdef6 by Éric Araujo in branch '3.2':
    Fix a typo and a broken link (part of bpo-10536).
    http://hg.python.org/cpython/rev/e48e6e9bdef6

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Oct 9, 2011

    New changeset 1e48a2b484a3 by Éric Araujo in branch '2.7':
    Fix a typo and a broken link (part of bpo-10536).
    http://hg.python.org/cpython/rev/1e48a2b484a3

    @andy-maier
    Copy link
    Mannequin

    andy-maier mannequin commented Jul 3, 2014

    Éric,
    I have reviewed the patch, and have one minor comment on it (see review page). Otherwise, I think it is good to go into v3 (The version list for this issue also shows 2.7, and the 2.7 version of this file is quite different from the v3 tip version, so a backport is still needed).

    Barry's review I think is also still needed :-)

    My 2 cents on your questions to Barry:

    On 3): I like your proposal.

    On a): Can you be more specific on where it is POSIX specific, and what the issue is with that?

    On b): After understanding that your comment is about the v3 version, I agree with the comment in general. However, the set of functions changes between 2.7 and 3.x tip (for example, ugettext() from v2 is no longer in v3 because gettext() now returns Unicode strings), and if people try to understand what changed, I think it would be helpful to be more explicit, particularly because the v2 text is also explicit. So I would leave the "Unicode string" verbiage unchanged. But I don't have a strong opinion on this and can go either way.

    Andy

    @serhiy-storchaka
    Copy link
    Member

    Éric, do you mind to create a PR? But please avoid unnecessary formatting changes like adding a second space between sequences. While I prefer such style, these changes doesn't affect the result output and distract attention from significant changes.

    @merwok
    Copy link
    Member Author

    merwok commented Nov 4, 2018

    I will try to find some time in the next month!

    @matrixise
    Copy link
    Member

    Serhyi and Eric, for which version of Python, only 2.7? or master, 3.6 & 3.7?

    @matrixise
    Copy link
    Member

    Serhiy & Éric, I have ported the patch to a PR for master (3.8).

    I have removed the double spaces and some useless diffs. You will find my diff file I have used for the PR.

    the git revision was 5d744a8

    Author: Stefan Krah <stefan@bytereef.org>
    Date: Fri Nov 26 11:07:04 2010 +0000

    Merged revisions 86791 via svnmerge from
    svn+ssh://pythondev@svn.python.org/python/branches/py3k
    
    ........
      r86791 | stefan.krah | 2010-11-26 11:54:09 +0100 (Fri, 26 Nov 2010) | 1 line
    
      Indentation cleanup.
    

    @matrixise matrixise added the 3.8 only security fixes label Nov 4, 2018
    @JulienPalard
    Copy link
    Member

    New changeset 55f3317 by Julien Palard (Stéphane Wirtel) in branch 'master':
    bpo-10536: Enhancements to gettext docs (GH-10324)
    55f3317

    @serhiy-storchaka
    Copy link
    Member

    I think it is worth to enhance documentation for other versions too. See also my comments on GitHub.

    @serhiy-storchaka serhiy-storchaka added the 3.7 (EOL) end of life label Nov 7, 2018
    @miss-islington
    Copy link
    Contributor

    New changeset 98b360e by Miss Islington (bot) in branch '3.7':
    [3.7] bpo-10536: Enhancements to gettext docs (GH-10324) (GH-13224)
    98b360e

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life 3.8 only security fixes docs Documentation in the Doc dir
    Projects
    None yet
    Development

    No branches or pull requests

    5 participants