Skip to content
Snippets Groups Projects
  1. Oct 12, 2018
  2. Aug 22, 2018
    • Katsunori FUJIWARA's avatar
      i18n: merge i18n comments of translatable texts correctly · d0e8933d6dad
      Katsunori FUJIWARA authored
      Before this patch, i18n comments of translatable texts are lost at
      creation of hg.pot file, if:
      
        - same translatable text appears multiple times,
        - the 1st appearance does not have i18n comment, and
        - any of rest has it
      
      For example, previous patch for filemerge.py adds translatable texts
      with i18n comments, but these comments are lost, because:
      
        - automatically added texts in docstring of internal merge tools are
          picked up earlier than these translatable texts, because of
          location in filemerge.py
      
        - but docstring has no i18n comment
      
      This patch makes addentry() of posplit merge i18n comments of later
      translatable texts, in order to keep them at creation of hg.pot.
      d0e8933d6dad
  3. Jun 11, 2018
  4. Jun 06, 2018
  5. May 14, 2018
  6. May 04, 2018
  7. May 01, 2018
  8. Mar 14, 2018
  9. Jan 31, 2018
  10. Dec 02, 2017
    • Yuya Nishihara's avatar
      log: translate column labels at once (issue5750) · c7b45db8f317
      Yuya Nishihara authored
      This makes sure that all columns are aligned. getlogcolumns() is hosted by
      templatekw so the namespaces module can see it.
      
      i18n/de.po is updated so test-log.t passes with no error. "obsolete:" and
      "instability:" are kept untranslated.
      c7b45db8f317
  11. Nov 21, 2017
  12. Nov 01, 2017
  13. Oct 23, 2017
  14. Sep 24, 2017
    • Yuya Nishihara's avatar
      scmutil: extract helper functions that returns human-readable change id · 4647e0a8d3d7
      Yuya Nishihara authored
      We do "'%d:%s' % (ctx...)" at several places, so let's formalize it. A low-
      level function, formatrevnode(ui, rev, node), is extracted so we can pass
      a manifest rev/node pair.
      
      Note that hex() for manifest output can be replaced with hexfunc() because
      it is printed only when debugflag is set.
      
      i18n/de.po is updated so test-log.t passes with no error.
      4647e0a8d3d7
  15. Jul 31, 2017
  16. Aug 22, 2017
  17. Aug 15, 2017
    • Katsunori FUJIWARA's avatar
      i18n: ignore docstring for modules under mercurial · d5ef17608159
      Katsunori FUJIWARA authored
      Docstring of modules is needed only for "hg help -e EXTNAME".
      
      This is a preparation for applying hggettext on util.py, which has
      module docstring, but it isn't needed for translation.
      d5ef17608159
    • Katsunori FUJIWARA's avatar
      i18n: use saved object to get actual function information if available · ed04d7254a91
      Katsunori FUJIWARA authored
      To list up available compression types instead of
      ".. bundlecompressionmarker" in "hg help bundlespec" output, proxy
      object "docobject" is used, because:
      
      - current online help system requires that __doc__ of registered
        object (maybe, function) is already well formatted in reST syntax
      
      - bundletype() method of compressionengine classes is used to list up
        available compression types, but
      
      - __doc__ of bundletype() object (= "instancemethod") is read-only
      
      On the other hand, hggettext requires original function object, in
      order to get document location in source code.
      
      Therefore, description of each compression types isn't yet
      translatable. Even if translatable, translators should make much
      effort to determine location of original texts in source code.
      
      To get actual function information, this patch makes hggettext use
      function object saved as "_origfunc", if it is available. This patch
      also changes bundlecompressiontopics() side, in order to explain how
      these changes work easily.
      
      This patch is a part of preparations for making description of each
      compression types translatable.
      ed04d7254a91
  18. Aug 13, 2017
    • Katsunori FUJIWARA's avatar
      i18n: ignore doctest part to avoid warning at "make update-pot" · 726dd73df3b9
      Katsunori FUJIWARA authored
      hggettext assumes that backslashes in docstring are always doubled in
      original source code, in order to find the location of original
      docstring out certainly.
      
      This assumption almost always works as expected. But doctest easily
      breaks it, because many of backslashes in doctests aren't doubled.
      This mismatching causes "unknown offset in ..." warning at "make
      update-pot".
      
      To avoid such warning, this patch ignores doctest part of docstring
      before finding the location of original docstring out.
      
      BTW, at this patch, only person() in templatefilters.py has doctest
      part, which causes "unknown offset ..." warning.
      
      Therefore, just making backslashes in that doctest doubled can avoid
      such warning, too. But forcing doctest writers to double backslashes
      in doctest isn't reasonable, IMHO.
      726dd73df3b9
  19. Aug 01, 2017
    • Katsunori FUJIWARA's avatar
      i18n: make hggettext use original docstring to compute offset · 97ee669f1f6d
      Katsunori FUJIWARA authored
      Before this patch, hggettext uses __doc__ of each functions to compute
      offset of document text.
      
      But __doc__ of many functions is already modified by decorators in
      registrar (e.g. @templatekeyword adds ":NAME: " prefix to it), and
      hggettext can not find it out in original source.
      
      This causes many "unknown offset in ..." warning at "make update-pot",
      and leaving them might cause overlooking serious problems.
      
      This patch makes hggettext use original docstring, which decorators in
      registrar save into _origdoc, to compute offset.
      
      Even after this patch, there are still a few "unknown offset in ..."
      warning at "make update-pot" for specific reasons. These will be fixed
      later one by one.
      97ee669f1f6d
  20. Jun 15, 2017
  21. Aug 01, 2017
    • Katsunori FUJIWARA's avatar
      i18n: use actual filename, in which function is defined, for hg.pot · 16a175b3681e
      Katsunori FUJIWARA authored
      Before this patch, source filename for msgid in hg.pot file becomes
      incorrect, if a function is defined in file A, but detected in dict in
      file B,
      
      For example, almost all debug* commands are defined in
      debugcommands.py, but hggettext detects them in "table" of
      commands.py. Therefore, docstring fragments of debug* commands are
      marked as "defined in commands.py" in hg.pot file.
      
      This is serious problem for translation, because the cost to find out
      original location of texts increases very much.
      16a175b3681e
  22. Jun 29, 2017
  23. Jun 17, 2017
    • Matt Harbison's avatar
      i18n: drop a py25 conditional · a7310a477966
      Matt Harbison authored
      I'm not sure how to test this one.  `make update-pot` spews all kinds of
      warnings, though it did before this change too.
      a7310a477966
  24. Jun 02, 2017
  25. Jun 01, 2017
  26. May 31, 2017
  27. Apr 30, 2017
  28. Mar 02, 2017
  29. Mar 01, 2017
  30. Feb 10, 2017
    • Katsunori FUJIWARA's avatar
      i18n: update Report-Msgid-Bugs-To property of *.po files · 4acf569facef
      Katsunori FUJIWARA authored
      This patch replaces domain of mercurial-devel ML address by
      mercurial-scm.org for "Report-Msgid-Bugs-To" property of each *.po
      files.
      
      This avoids releasing 4.1.1 with invalid "Report-Msgid-Bugs-To"
      in *.mo file, if corresponded *.po file isn't msgmerge-ed with recent
      hg.pot by translator.
      
      These *.po files aren't covered by check-code.py pattern newly added
      in subsequent patch, because it ignores them.
      4acf569facef
  31. Feb 01, 2017
  32. Jan 04, 2017
  33. Dec 31, 2016
  34. Dec 01, 2016
  35. Nov 25, 2016
  36. Nov 28, 2016
  37. Nov 14, 2016
Loading