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

Update PO files #1659

Merged
merged 2 commits into from
Apr 3, 2023
Merged

Update PO files #1659

merged 2 commits into from
Apr 3, 2023

Conversation

newswangerd
Copy link
Member

No-Issue

@netlify
Copy link

netlify bot commented Mar 29, 2023

Deploy Preview for galaxyng ready!

Name Link
🔨 Latest commit 7786af0
🔍 Latest deploy log https://app.netlify.com/sites/galaxyng/deploys/64249d2080ea050008ce7414
😎 Deploy Preview https://deploy-preview-1659--galaxyng.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@himdel
Copy link
Collaborator

himdel commented Mar 29, 2023

Looks like the lint-po failures are caused by gettext trying to be clever and adding mismatching fuzzy translations (instead of leaving empty for new strings).

This should help removing them...

#!/usr/bin/env perl
use v5.30;

my $fuzzy = 0;
my $msgstr = 0;
while (<>) {
  # empty line resets
  $fuzzy = 0 if /^$/;
  $msgstr = 0 if /^$/;

  # detect fuzzy
  $fuzzy = 1 if /^#, fuzzy/;

  # skip fuzzy msgid original
  next if /#| msgid/ and $fuzzy;

  # skip fuzzy msgstr
  if ($fuzzy && /^msgstr/) {
    print qq(msgstr ""\n);
    $msgstr = 1;
  }
  next if $msgstr;

  print;
}

perl -i unfuz.pl galaxy_ng/locale/*/LC_MESSAGES/django.po


 #: app/constants.py:54 app/constants.py:60 app/constants.py:66
-#, fuzzy
-#| msgid "Collection %s not found"
 msgid "Collections"
-msgstr "No se encontró la colección %s"
+msgstr ""

🎉 :)

EDIT: added here

@himdel himdel merged commit 10aba42 into ansible:master Apr 3, 2023
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.

4 participants