Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-77393: Add--statistics opt tomsgfmt.py#132136

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
StanFromIreland wants to merge7 commits intopython:main
base:main
Choose a base branch
Loading
fromStanFromIreland:msgfmt-stat

Conversation

StanFromIreland
Copy link
Contributor

@StanFromIrelandStanFromIreland commentedApr 5, 2025
edited
Loading

Copy link
Member

@tomasr8tomasr8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'd also add a test for multiple input files

@StanFromIreland
Copy link
ContributorAuthor

For multiple input it works like so:

2 translated messages.4 translated messages.

Is this the format we want (It is not the best, but then again the current situation is poor since it just silently passes anyway)? I cannot compare toGNU msgfmt here since it doesn't allow this.

@tomasr8
Copy link
Member

For multiple input it works like so:

2 translated messages.4 translated messages.

Is this the format we want (It is not the best, but then again the current situation is poor since it just silently passes anyway)? I cannot compare toGNU msgfmt here since it doesn't allow this.

Just an idea, but maybe prefix each line with the filename in case more than one file is given?

@StanFromIreland
Copy link
ContributorAuthor

Just an idea, but maybe prefix each line with the filename in case more than one file is given?

I considered that, but then again do we also want that for single files, otherwise there is an even more complex printing system ;-) This will then be inconsistent with GNU msgfmt

@tomasr8
Copy link
Member

Just an idea, but maybe prefix each line with the filename in case more than one file is given?

I considered that, but then again do we also want that for single files, otherwise there is an even more complex printing system ;-) This will then be inconsistent with GNU msgfmt

no, just when more than one file is given, so that it's consistent w/ GNU but still useful in the other case.

StanFromIreland reacted with thumbs up emoji

@StanFromIrelandStanFromIreland marked this pull request as draftApril 5, 2025 20:39
@StanFromIreland
Copy link
ContributorAuthor

I think I need to fix something. I will look into it tomorrow, it seems off.

@StanFromIrelandStanFromIreland marked this pull request as ready for reviewApril 5, 2025 20:55
Comment on lines +177 to +181
# Multiple input files
res = assert_python_ok(msgfmt, '--statistics', '-o', 'temp.mo', data_dir / "general.po", data_dir / "fuzzy.po")
out = res.out.decode('utf-8').strip()
self.assertIn('general.po: 8 translated messages, 1 untranslated message.', out)
self.assertIn('fuzzy.po: 0 translated messages.', out)
Copy link
ContributorAuthor

@StanFromIrelandStanFromIrelandApr 5, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Also a test for#53950 :-) Do we want a separate test too?

@python-cla-bot
Copy link

All commit authors signed the Contributor License Agreement.

CLA signed

@StanFromIreland
Copy link
ContributorAuthor

What do we want to do with this? It is an option in GNU msgfmt@serhiy-storchaka

@StanFromIreland
Copy link
ContributorAuthor

Friendly ping@serhiy-storchaka

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@tomasr8tomasr8Awaiting requested review from tomasr8

@serhiy-storchakaserhiy-storchakaAwaiting requested review from serhiy-storchaka

Assignees
No one assigned
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@StanFromIreland@tomasr8@serhiy-storchaka

[8]ページ先頭

©2009-2025 Movatter.jp