← 输入框|github.com|刷新
Skip to content

"CPython implementation detail:" removed when content translated #72518

Closed

Description

@methane
BPO 28331
Nosy @birkenfeld, @terryjreedy, @methane, @berkerpeksag
PRs
  • bpo-28331: fix "CPython implementation detail:" label is removed when content is translated. #195
  • [3.6] bpo-28331: fix impl-detail label is removed when content is translated. #769
  • Files
  • impl-detail.patch
  • impl-detail2.patch
  • 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 = None
    closed_at = <Date 2017-03-22.12:10:05.688>
    created_at = <Date 2016-10-01.13:29:12.357>
    labels = ['type-feature', '3.7', 'docs']
    title = '"CPython implementation detail:" removed when content translated'
    updated_at = <Date 2017-03-24.22:41:36.817>
    user = 'https://github.com/methane'

    bugs.python.org fields:

    activity = <Date 2017-03-24.22:41:36.817>
    actor = 'methane'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2017-03-22.12:10:05.688>
    closer = 'methane'
    components = ['Documentation']
    creation = <Date 2016-10-01.13:29:12.357>
    creator = 'methane'
    dependencies = []
    files = ['44910', '44969']
    hgrepos = []
    issue_num = 28331
    keywords = ['patch']
    message_count = 8.0
    messages = ['277817', '278106', '278107', '278108', '278111', '278272', '290098', '290266']
    nosy_count = 7.0
    nosy_names = ['georg.brandl', 'terry.reedy', 'methane', 'docs@python', 'berker.peksag', 'JulienPalard', 'Julien.Palard']
    pr_nums = ['195', '769']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue28331'
    versions = ['Python 3.6', 'Python 3.7']

    Activity

    1. methane commented on Oct 1, 2016

      @methane
      MemberAuthor

      "CPython implementation detail:" label is removed when contents of impl-detail directive is translated.
      This is very bad for people reading translated documents.

      Attached patch fixes this, with enabling translating the label, like versionchanged directive.

    2. added
      docsDocumentation in the Doc dir
      type-featureA feature request or enhancement
      on Oct 1, 2016
    3. berkerpeksag commented on Oct 5, 2016

      @berkerpeksag
      Member

      Does Sphinx use a dummy HTML file like you did in the patch?

    4. methane commented on Oct 5, 2016

      @methane
      MemberAuthor

      Yes. Actually speaking, this patch is almost copy from VersionChanged directive.
      See here:
      https://github.com/sphinx-doc/sphinx/blob/master/sphinx/directives/other.py#L216-L221

    5. berkerpeksag commented on Oct 5, 2016

      @berkerpeksag
      Member

      I couldn't find any dummy HTML in the Sphinx codebase.

      Wouldn't something like work without a dummy HTML?

          from sphinx.locale import versionlabels, l_
      versionlabels['cpythonimpldetail'] = l_('CPython implementation detail')
      

      Then use it in ImplementationDetail.run() method like https://github.com/sphinx-doc/sphinx/blob/master/sphinx/directives/other.py#L204

    6. methane commented on Oct 5, 2016

      @methane
      MemberAuthor

      Ah, I misunderstood your comment is about Sphinx's internal DOM.

      Sphinx has own pot and po files.

      In case of custom extension, sphinx-build -b gettext doesn't extract
      messages from Python code. That's why I used dummy html template.

      Another way is adding custom make target, which runs sphinx-build -b gettext
      and custom command to generate another pot from pyspecific extension.

    7. terryjreedy commented on Oct 7, 2016

      @terryjreedy
      Member

      I abbreviated title to make most of it visible in listings.

    8. changed the title [-]"CPython implementation detail:" is removed when contents is translated[/-] [+]"CPython implementation detail:" removed when content translated[/+] on Oct 7, 2016
    9. methane commented on Mar 24, 2017

      @methane
      MemberAuthor

      New changeset 906118d by INADA Naoki in branch '3.6':
      bpo-28331: fix impl-detail label is removed when content is translated. (GH-769)
      906118d

    10. methane commented on Mar 24, 2017

      @methane
      MemberAuthor

      New changeset c351ce6 by INADA Naoki in branch 'master':
      bpo-28331: fix impl-detail label is removed when content is translated. (GH-195)
      c351ce6

    11. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      3.7 (EOL)end of lifedocsDocumentation in the Doc dirtype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions