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

Add Russian translation #3875

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

ponfertato
Copy link

Greetings!
Sketched out a translation into Russian, as a base language was used #3552 with my corrections and additions. If there are any conflicts in the translation, welcome feedback!

@pfrazee pfrazee added intl Internationalization intl-needs-confirmation Submitted internationalization that needs confirmations by native speakers. labels May 6, 2024
@pfrazee
Copy link
Collaborator

pfrazee commented May 6, 2024

Thank you so much @ponfertato! Do you happen to know any other russian speakers who could review this?

@ponfertato
Copy link
Author

Thank you so much @ponfertato! Do you happen to know any other russian speakers who could review this?

There is no one in particular at the moment, I have requested help from the Bluesky audience, it could probably take a while to get there 👀

src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
Copy link

@korsakov korsakov left a comment

Choose a reason for hiding this comment

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

Some stylistic consistency opportunities in addition to the ones highlighted by other reviewer. Really cool to see this effort!

src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
Copy link

@timmarinin timmarinin left a comment

Choose a reason for hiding this comment

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

Overall it’s good, I’ve read up to 1840 line (will continue later) and left some nitpicky comments and suggestions.

for consistency I think it is better to define terms:

  • post as пост, not сообщение ;
  • app password as пароль приложения;
  • follow as подписка, not слежка;
  • feed as лента;
  • maybe account as аккаунт? Учетная запись is a bit much.

src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
#: src/Navigation.tsx:290
#: src/view/screens/AccessibilitySettings.tsx:63
msgid "Accessibility Settings"
msgstr "Настройки Доступности"

Choose a reason for hiding this comment

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

Probably доступности should be lowercase

Copy link
Author

Choose a reason for hiding this comment

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

I would have done the same thing if it weren't for line 81, which has a lowercase in it.

src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
src/locale/locales/ru/messages.po Outdated Show resolved Hide resolved
@DearFox
Copy link

DearFox commented May 29, 2024

Thank you so much @ponfertato! Do you happen to know any other russian speakers who could review this?

There is no one in particular at the moment, I have requested help from the Bluesky audience, it could probably take a while to get there 👀

I'd love to help with this, but it would be cool to see the translation directly in the interface. Perhaps you could publish messages.js for this translation, I'll try to locally replace one of the links like "https://bsky.app/static/js/src/locale/locales/en/messages.js" with the translation file, or something like that.

@ponfertato
Copy link
Author

ponfertato commented May 29, 2024

messages.js
like "https://bsky.app/static/js/src/locale/locales/en/messages.js"

Greetings, I'm not sure why you need .js, there's a .po file with the translation 👀
https://github.com/bluesky-social/social-app/blob/main/src/locale/locales/en/messages.po or the one that is now the translation: https://github.com/potatoenergy/social-app/blob/main/src/locale/locales/ru/messages.po

@DearFox
Copy link

DearFox commented May 29, 2024

messages.js
like "https://bsky.app/static/js/src/locale/locales/en/messages.js"

Greetings, I'm not sure why you need .js, there's a .po file with the translation 👀 https://github.com/bluesky-social/social-app/blob/main/src/locale/locales/en/messages.po or the one that is now the translation: https://github.com/potatoenergy/social-app/blob/main/src/locale/locales/ru/messages.po

Oh, I just saw that I gave a link to 404. I don’t understand much about how translations work, but in fact on the bsky site translations in the .po format are not used. Instead, they are turned into a js file with json inside. My idea was to locally replace one of the translations for the bsky.app site with this one, but I don't think I can use .po for this.
Here is an example of English and Ukrainian translation: en: https://bsky.app/static/js/521.f870cbb6.chunk.js uk: https://bsky.app/static/js/889.125c76ab.chunk.js

Well, or am I just wrong, and is there some easier way to try out the translation directly on the site, rather than reading the translation strings?

@ponfertato
Copy link
Author

ponfertato commented May 29, 2024

Here is an example of English and Ukrainian translation

Ahh, I see your point. The point is that this translation is currently used in the bsky fork. I plan to add it to the source code of the project in order to build it into the main product in the future. You can familiarize yourself with the .po file. There are links to the lines of code that have been translated, for example:

#: src/view/com/threadgate/WhoCanReply.tsx:158
msgid "<0/> members"
msgstr "<0/> участников"

Where msgid is the original string and msgstr is its Russian translation, link: https://github.com/potatoenergy/social-app/blob/11e63802ec493aa1e0efd403168489359b777a36/src/locale/locales/ru/messages.po#L29C1-L31C25

@DearFox
Copy link

DearFox commented May 29, 2024

I tried to compile your fork, but it seems there are some problems with the paths for ru localization.

Exporting with Webpack...
Failed to compile
ModuleNotFoundError: Module not found: Error: Can't resolve './locales/ru/messages' in 'E:\Git\social-app\src\locale'
ModuleNotFoundError: Module not found: Error: Can't resolve './locales/ru/messages' in 'E:\Git\social-app\src\locale'

In all other languages ​​I get a messages.js file next to messages.po, but not in ru

@DearFox
Copy link

DearFox commented May 29, 2024

I tried to compile your fork, but it seems there are some problems with the paths for ru localization.

Exporting with Webpack...
Failed to compile
ModuleNotFoundError: Module not found: Error: Can't resolve './locales/ru/messages' in 'E:\Git\social-app\src\locale'
ModuleNotFoundError: Module not found: Error: Can't resolve './locales/ru/messages' in 'E:\Git\social-app\src\locale'

In all other languages ​​I get a messages.js file next to messages.po, but not in ru

I couldn't find what the problem was, but I was able to replace one of the translations with ru, so that yarn created messages.js, after which I used "Add script override" on one of the js files containing the translation and replaced locally the original translation translation to this one.
So it seems like it worked. I can describe in more detail how I did it and share the file with the translation if you also want to try the Russian translation in your browser.

изображение

@DearFox
Copy link

DearFox commented May 29, 2024

Several edits/suggestions for translation.
"Оповещение" > "Уведомления"
изображение
"Предпочтения" > "Нравится"
изображение
"Эл. адреса" > "Эл. почта"
изображение

And it seems that there is a part of the stock for which there is no translation at the moment (as well as the lines themselves).
изображение
изображение
изображение

В ручную объеденил исправленный RU с самым новым EN. Могут быть ошибки но быстрый тест проблем не выявил.
Добавлены новые строки для перевода
@DearFox
Copy link

DearFox commented May 29, 2024

I wrote a small guide on how you can try translation directly to bsky.app: potatoenergy#2 (comment) (it's in russian)
I hope this will help improve the translation before adding it to the site.

@@ -91,6 +92,10 @@ export async function dynamicActivate(locale: AppLanguage) {
await import('@formatjs/intl-pluralrules/locale-data/pt')
break
}
case AppLanguage.ru: {
i18n.loadAndActivate({locale, messages: messagesRu})
break
Copy link
Contributor

Choose a reason for hiding this comment

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

Looking at the other language codes, I think there might be a line missing here?

await import('@formatjs/intl-pluralrules/locale-data/ru')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
intl Internationalization intl-needs-confirmation Submitted internationalization that needs confirmations by native speakers.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants