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

fix: use positional argument for "providers available" translation #2537

Open
wants to merge 1 commit into
base: next
Choose a base branch
from

Conversation

scarf005
Copy link

@scarf005 scarf005 commented Nov 28, 2024

fixes #2517.

regexes used (for future reference)

for go, en.po, sk.po:

msgid "There are %d providers available for %s:"
msgid "There are %1$d providers available for %2$s:"

for cs.po, ko.po, tr.po:

msgid "There are %d providers available for %s:"\nmsgstr "(.*)%s(.*)%d(.*)"
msgid "There are %1$d providers available for %2$s:"\nmsgstr "$1%2$s$2%1$d$3"

everything else:

msgid "There are %d providers available for %s:"\nmsgstr "(.*)%d(.*)%s(.*)"
msgid "There are %1$d providers available for %2$s:"\nmsgstr "$1%1$d$2%2$s$3"

@scarf005 scarf005 requested a review from Jguer as a code owner November 28, 2024 12:18
Copy link
Owner

@Jguer Jguer left a comment

Choose a reason for hiding this comment

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

Thanks for the PR @scarf005!

@Jguer Jguer enabled auto-merge (squash) November 28, 2024 14:09
@Jguer Jguer disabled auto-merge December 2, 2024 08:57
@Jguer
Copy link
Owner

Jguer commented Dec 2, 2024

Seems there's some issues with the library @scarf005

@scarf005
Copy link
Author

scarf005 commented Dec 3, 2024

pkg/db/ialpm/alpm.go:179:77: github.com/leonelquinteros/gotext.Get format %1$ has unknown verb $
FAIL	github.com/Jguer/yay/v12/pkg/db/ialpm [build failed]
	github.com/Jguer/yay/v12/pkg/db/mock		coverage: 0.0% of statements
# github.com/Jguer/yay/v12/pkg/dep
# [github.com/Jguer/yay/v12/pkg/dep]
pkg/dep/dep_graph.go:726:77: github.com/leonelquinteros/gotext.Get format %1$ has unknown verb $
ok  	github.com/Jguer/yay/v12	1.092s	coverage: 38.2% of statements
ok  	github.com/Jguer/yay/v12/pkg/completion	1.027s	coverage: 38.0% of statements
FAIL	github.com/Jguer/yay/v12/pkg/dep [build failed]

not sure why linter is complaining at gotext.Get format string.

@scarf005 scarf005 force-pushed the fix/2517/Korean-translations-kopo-not-properly-formatted branch from 42482af to de830bd Compare December 3, 2024 18:53
@scarf005
Copy link
Author

scarf005 commented Dec 3, 2024

found out that go positional strings use different notation([1]) than C(1$): leonelquinteros/gotext#101 (comment)
applied fix and force pushed.

@scarf005 scarf005 requested a review from Jguer December 10, 2024 01:39
@scarf005
Copy link
Author

@Jguer could you re-run the workflow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Korean translations (ko.po) not properly formatted
2 participants