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

ro: Refresh Romanian translation #1991

Merged
merged 1 commit into from May 21, 2024
Merged

ro: Refresh Romanian translation #1991

merged 1 commit into from May 21, 2024

Conversation

RazvanSt
Copy link
Contributor

Some more updates to the translation.

@mgeisler
Copy link
Collaborator

Hi @RazvanSt, thanks for the update! Running

gh pr diff 1991 | bat -l patch

shows me that you're re-introducing line numbers on the source lines:

-#: src/SUMMARY.md
+#: src/SUMMARY.md:18 src/SUMMARY.md:47 src/SUMMARY.md:76 src/SUMMARY.md:103
+#: src/SUMMARY.md:129 src/SUMMARY.md:149 src/SUMMARY.md:167 src/SUMMARY.md:190
+#: src/SUMMARY.md:213 src/SUMMARY.md:262 src/SUMMARY.md:304 src/SUMMARY.md:355
 msgid "Welcome"
 msgstr "Bine ați venit"
 
-#: src/SUMMARY.md src/hello-world.md src/hello-world/hello-world.md
-#, fuzzy
+#: src/SUMMARY.md:19 src/SUMMARY.md:24 src/hello-world.md:1
+#: src/types-and-values/hello-world.md:1
 msgid "Hello, World"
-msgstr "Bună lume!"
+msgstr "Bună lume"

This is because you haven't set the "granularity" when extracting strings. See TRANSLATIONS.md. Perhaps your mdbook-i18n-helpers are old, if the setting doesn't seem to have an effect.

@RazvanSt
Copy link
Contributor Author

RazvanSt commented Apr 15, 2024 via email

@RazvanSt
Copy link
Contributor Author

Should be fixed now, but the format still fails.

@mgeisler
Copy link
Collaborator

Should be fixed now,

I still see the line numbers on the source lines:

diff --git a/po/ro.po b/po/ro.po
index 33b56d8efca..edf6bb20bbb 100644
--- a/po/ro.po
+++ b/po/ro.po
@@ -1,8 +1,8 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: Comprehensive Rust 🦀\n"
-"POT-Creation-Date: 2024-01-24T13:24:49+01:00\n"
-"PO-Revision-Date: 2023-11-07 15:51+0200\n"
+"POT-Creation-Date: 2024-04-15T17:42:59+03:00\n"
+"PO-Revision-Date: 2024-04-05 08:52+0300\n"
 "Last-Translator: Razvan Stefanescu <rstefanescu@google.com>\n"
 "Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
 "Language: ro\n"
@@ -11,1268 +11,1286 @@ msgstr ""
 "Content-Transfer-Encoding: 8bit\n"
 "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < "
 "20)) ? 1 : 2;\n"
-"X-Generator: Poedit 3.4.1\n"
+"X-Generator: Poedit 3.4.2\n"
 
-#: src/SUMMARY.md src/index.md
+#: src/SUMMARY.md:3 src/index.md:1
 msgid "Welcome to Comprehensive Rust 🦀"
 msgstr "Bine ați venit la Comprehensive Rust 🦀 (ghidul complet pentu Rust)"

but the format still fails.

Try deleting the old entries that start with #~:

@@ -38324,8 +42824,8 @@ msgstr ""
 #~ "        let Some(request_segment) = request_segments.next() else {\n"
 #~ "            return false;\n"
 #~ "        };\n"
-#~ "        if request_segment != prefix_segment && prefix_segment ! = "
-#~ "\"*\" {\n"
+#~ "        if request_segment != prefix_segment && prefix_segment ! = \"*\" "
+#~ "{\n"
 #~ "            return false;\n"
 #~ "        }\n"
 #~ "    }\n"

They represent inactive translations.

@RazvanSt RazvanSt force-pushed the ro-part-1 branch 5 times, most recently from 4d1f35c to 7f8d73c Compare April 16, 2024 11:15
@RazvanSt
Copy link
Contributor Author

Phew. Fixed. I used to "Translation/Purge Deleted Translations" in Poedit to remove stalled translations and fixed to left/right single/double quotes.

@mgeisler
Copy link
Collaborator

@RazvanSt, do you know someone who could review your PRs? I just need someone to read through them and click the review button. It would be great if you know a Romanian Rust community?

@mgeisler
Copy link
Collaborator

-#: src/SUMMARY.md src/index.md
+#: src/SUMMARY.md:3 src/index.md:1
 msgid "Welcome to Comprehensive Rust 🦀"
 msgstr "Bine ați venit la Comprehensive Rust 🦀 (ghidul complet pentu Rust)"

This is still a problem: please make sure to use the "granularity": 0 setting when running mdbook-xgettext.

@RazvanSt
Copy link
Contributor Author

RazvanSt commented May 9, 2024 via email

@RazvanSt
Copy link
Contributor Author

RazvanSt commented May 9, 2024 via email

@mgeisler
Copy link
Collaborator

There is no difference in the messages.pot file when using granularity 0 or 1. Tested with mdbook v0.4.36 and v0.4.37. Am I missing something?

Strange, but I think I know what it is: you probably need to update mdbook-i18n-helpers:

cargo install mdbook-i18n-helpers

You should have version 0.3.2.

The use of mdbook build -d po* looks a bit odd. Just use mdbook build -d po to put the file into the po/ directory.

@mgeisler
Copy link
Collaborator

Unfortunately I do not know anybody in the romanian Rust community, but I'll ask one of my colleagues to take a look.

Thank you, that will be great! You can also try asking on various forums — I've done that myself in the past.

@RazvanSt RazvanSt force-pushed the ro-part-1 branch 6 times, most recently from b095e16 to d087f80 Compare May 20, 2024 13:41
Some more updates to the translation.
Updated the template used.

Signed-off-by: Mihai Preda <mpreda@google.com>
Signed-off-by: Razvan Stefanescu <rstefanescu@google.com>
@mgeisler mgeisler changed the title ro: Update Apr 4th ro: Refresh Romanian translation May 21, 2024
@mgeisler
Copy link
Collaborator

It looks good now, let's merge this! Thanks!

Until the translation is ~50% done, I would recommend freshing it only every ~3 months or so.

@mgeisler mgeisler merged commit 25d234b into google:main May 21, 2024
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants