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

chore(macros/GamesSidebar): add Russian translation #10984

Merged
merged 9 commits into from
Apr 26, 2024

Conversation

pseudopilot
Copy link
Contributor

@pseudopilot pseudopilot commented Apr 24, 2024

Summary

Add Russian translation to Games Sidebar.

Problem

When Russian language is chosen the Games Sidebar is still shown in English

Solution

Add Russian translation to kumascript/macros/GamesSidebar.ejs.

Before

Games Sidebar is shown in en-US for Russian language content

After

Games Sidebar is shown in ru for Russian language content

@github-actions github-actions bot added the macros tracking issues related to kumascript macros label Apr 24, 2024
@pseudopilot pseudopilot marked this pull request as ready for review April 24, 2024 08:53
@pseudopilot pseudopilot requested a review from a team as a code owner April 24, 2024 08:53
@caugner caugner requested review from a team and myshov and removed request for a team April 24, 2024 18:02
@caugner
Copy link
Contributor

caugner commented Apr 24, 2024

@mdn/yari-content-ru Can you please take a look at these changes? 🙏

@leon-win
Copy link
Member

@mdn/yari-content-ru Can you please take a look at these changes? 🙏

In progress =)

@caugner Is it possible to make this request editable for me?
I think it will be faster to make edits this way (now and in future PRs). In https://github.com/mdn/translated-content I can make changes to other people's PRs, but in https://github.com/mdn/yari/ I can only view =(

@caugner
Copy link
Contributor

caugner commented Apr 24, 2024

@leon-win You should be able to click on the "Files changed" tab, then select one more lines you want to make suggestions for, then click the "Add a suggestion" button, edit the selected lines, then click on "Start your review" (for the first comment) or "Add review comment" (for the following ones), finally click "Finish your review" at the top right.

See also: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request#starting-a-review

Here's a screen recording showing the suggestion feature:

Screen.Recording.2024-04-24.at.23.38.12.mov

kumascript/macros/GamesSidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/GamesSidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/GamesSidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/GamesSidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/GamesSidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/GamesSidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/GamesSidebar.ejs Outdated Show resolved Hide resolved
kumascript/macros/GamesSidebar.ejs Outdated Show resolved Hide resolved
@leon-win
Copy link
Member

@leon-win You should be able to click on the "Files changed" tab, then select one more lines you want to make suggestions for, then click the "Add a suggestion" button, edit the selected lines, then click on "Start your review" (for the first comment) or "Add review comment" (for the following ones), finally click "Finish your review" at the top right.

See also: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request#starting-a-review

Here's a screen recording showing the suggestion feature:
Screen.Recording.2024-04-24.at.23.38.12.mov

Thank you for detailed description! 👍
I did it this way 👌

But when there are a lot of edits, it’s more convenient to just commit to the request, in my opinion it’s faster and easier))

In the mdn/translated-content I can do this:
image

But not in yari:
image

Does it depend on the repository settings or do I just not have enough rights?

@leon-win
Copy link
Member

@pseudopilot , спасибо за желание улучшить MDN!)

Несколько комментариев.

По поводу описания PR, если добавляешь секции Before и After, то они обычно подразумевают что-то более наглядное, то есть лучше там помещать скриншоты, как было и как стало. Тогда будет гораздо удобнее погружаться в суть того, что было сделано.

По поводу самих изменений: в этом репоизитории я не могу вносить изменения напрямую (а это на мой взгляд быстрее и проще), поэтому пришлось делать несколько suggest'ов, ты их принял (кстати об этом хорошо бы писать комментарий, чтобы было наглядно)) и теперь можно бы вливать изменения... но есть проблема:
image

То есть влить изменения с неподписанными коммитами не получится. Как подписывать коммиты можно прочитать в документации (https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification).

Наверное будет проще создать новую ветку и новый PR. Если нет возможности этим заниматься, то могу сделать я, мне будет недолго, так как изменения уже подготовлены и доработаны.

@pseudopilot
Copy link
Contributor Author

@leon-win , спасибо за пояснения. Я сделаю новый ПР.
Касательно скриншотов - я хотел их прикрепить, но у меня почему-то не получилось локально добиться обновления этого переведенного сайдбара, хотя локально проект запустился. Запускал по README.
Возможно, есть какие-то нюансы?

@leon-win
Copy link
Member

leon-win commented Apr 25, 2024

@leon-win , спасибо за пояснения. Я сделаю новый ПР. Касательно скриншотов - я хотел их прикрепить, но у меня почему-то не получилось локально добиться обновления этого переведенного сайдбара, хотя локально проект запустился. Запускал по README. Возможно, есть какие-то нюансы?

Блин)))

Я только что (прямо несколько минут назад!) сделал #11005

Посмотри его плиз, если есть замечания, напиши комментарий. А этот ПР закроем.

По поводу запуска yari: вроде особых нюансов нет, запускается командой yarn dev:
image

А что возникает при запуске, какие сообщения?

@pseudopilot
Copy link
Contributor Author

Посмотри его плиз, если есть замечания, напиши комментарий. А этот ПР закроем.

Всё отлично, спасибо!
Попрактикуюсь с подписями на следующем ПР 😃

@leon-win
Copy link
Member

@caugner, close this PR please.

I created a similar request (#11005) because this one was having problems with the merge due to signatures.

And if it’s not difficult, please answer my question above (about rights in this repository).

By the way, I can’t close this PR, as far as I understand this is also due to special access settings?

@pseudopilot
Copy link
Contributor Author

@leon-win , с запуском разобрался. В .env была закомментирована строка с адресом translated-content. 😃

@caugner caugner changed the title chore(macros/gamessidebar): add russian translation chore(macros/GamesSidebar): add Russian translation Apr 26, 2024
@caugner caugner merged commit 9439029 into mdn:main Apr 26, 2024
9 of 10 checks passed
@caugner
Copy link
Contributor

caugner commented Apr 26, 2024

Does it depend on the repository settings or do I just not have enough rights?

@leon-win Yes, you "only" have write access on the translated-content repo, but few people (mainly MDN staff) have this permission on the yari repo. But eventually we should have less translations in yari, because we want to migrate all sidebars to use smartLink(), which automatically uses the page's short-title or title in the locale.

@leon-win
Copy link
Member

Does it depend on the repository settings or do I just not have enough rights?

@leon-win Yes, you "only" have write access on the translated-content repo, but few people (mainly MDN staff) have this permission on the yari repo. But eventually we should have less translations in yari, because we want to migrate all sidebars to use smartLink(), which automatically uses the page's short-title or title in the locale.

Thank you for the explanation.
I think automatic generation sidebars from short-titles is good idea! 👍

@caugner
Copy link
Contributor

caugner commented Apr 26, 2024

I think automatic generation sidebars from short-titles is good idea! 👍

The caveat is that you can then only have translated titles for the pages that are available in the current locale.

@leon-win
Copy link
Member

I think automatic generation sidebars from short-titles is good idea! 👍

The caveat is that you can then only have translated titles for the pages that are available in the current locale.

Those for which there is no translation will have English names. In my opinion there is no contradiction in this.
In addition, by analogy with other links for which there is no translation, we can add a postfix (Some link without translation (англ.))

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

Successfully merging this pull request may close these issues.

3 participants