babel icon indicating copy to clipboard operation
babel copied to clipboard

Implementation of msgcat and msgmerge utilities from GNU gettext

Open soft-suroleb opened this issue 1 year ago • 9 comments

Implementation of some features for msgcat and msgmerge to work with a compendium in PyBabel

pybabel concat

  • Allows concatenating multiple .po files into one.
  • In case of translation conflicts, the translation from the first file is taken, as if the use-first option is set to true. Flags, locations, and other information in messages are combined.
  • Implemented options:
    • output-file
    • less-than
    • more-than
    • unique
    • use-first
    • no-location
    • width
    • no-wrap
    • sort-output
    • sort-by-file

pybabel merge

  • Enables merging files using a compendium for translation memory.
  • The compendium can be used in two modes:
    • Default mode: Translations from the compendium are taken if absent in the output file.
    • Compendium overwrite mode: With the compendium-overwrite option, translations in the compendium are considered primary and overwrite those in the output file. If a translation is taken from the compendium, a comment is added specifying the source.
  • Implemented options:
    • input-files
    • compendium
    • compendium-overwrite
    • no-compendium-comment
    • update
    • output-file
    • backup
    • suffix
    • no-fuzzy-matching
    • no-location
    • width
    • no-wrap
    • sort-output
    • sort-by-file

soft-suroleb avatar Dec 09 '24 19:12 soft-suroleb

Hi guys! I see you marked pr but still haven't left any comments. Will it be reviewed?

soft-suroleb avatar Feb 28 '25 13:02 soft-suroleb

Made support for conflicting messages from different po-files during concatenation. If one message has different translations in different files, then the corresponding strings marked with a comment about conflict

soft-suroleb avatar Mar 23 '25 16:03 soft-suroleb

Guys? Will there be another round? :)

soft-suroleb avatar Jun 13 '25 09:06 soft-suroleb

@soft-suroleb Sorry, I was honeymooning in Japan for the last 3 weeks 😄

There's still a bunch of unresolved comments from me from the last round of review, I think?

akx avatar Jun 24 '25 12:06 akx

Oh, my congrats :) Yeah, but there is question for you in the unresolved comment

soft-suroleb avatar Jul 06 '25 13:07 soft-suroleb

Guys? @akx

soft-suroleb avatar Sep 04 '25 09:09 soft-suroleb

Oh, my congrats :) Yeah, but there is question for you in the unresolved comment

Looking at this again... Sorry, which comment? There's a bunch of comments unresolved 😅

akx avatar Oct 08 '25 10:10 akx

https://github.com/python-babel/babel/pull/1161#discussion_r1998899769

This comment. And why bunch of comments? I think only that, all others were being resolved

soft-suroleb avatar Nov 09 '25 16:11 soft-suroleb

Things like https://github.com/python-babel/babel/pull/1161/files/dd44348272edb1d8bd86818f16ea54809cfd0851#diff-9b4dc8cb664f244c13aebdf018a3748731477a5bb7903a9677326c7ebc177f7b et al – GitHub can be confusing with the "hidden conversations" marker sometimes hiding unresolved comments Screenshot 2025-11-12 at 14 30 24 but every outstanding comment should be available on the Files page.

akx avatar Nov 12 '25 12:11 akx