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

New localization strings (WIP) #193

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

Conversation

VexorionReal
Copy link

I added more localization strings. I need to figure out how to change the separator in the view count from "," to " " (non-breaking space) and make the sub count match the text "subskrybentów". For example, it is supposed to be "50 454", not "50,4 tys. subskrybentów". Can you help me with this?

@Lort533
Copy link
Contributor

Lort533 commented Feb 28, 2024

The view count change you did is wrong. It's supposed to have a comma (it didn't have a space in Polish version, not a comma either, simply view count, like: 12345). My bad, didn't check the changes entirely, yet your way of thinking about view count in Polish version is wrong..

@@ -1348,7 +1438,7 @@ function createWatch4(wV) {
<div id="watch4-views-info">
<div id="watch4-view-count">
<span id="js-view-count">???,???</span>
<span id="views-text"> views</span>
<span id="views-text">${emeraldLanguageModel.views}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

space missing

@Lort533
Copy link
Contributor

Lort533 commented Feb 28, 2024

If that's not a problem, I can commit over these changes to fix up some things so they remain being correct, and add some stuff that is not in the original code yet to improve localization.

@VexorionReal
Copy link
Author

Okay.

@Lort533
Copy link
Contributor

Lort533 commented Feb 28, 2024

I'm not sure why some things are put into several span's like upload date, can't translate that 1:1 as it is originally was because of that. I would like to not change the code this much, so I'll leave the project author to comment on that.

Also there should be separate localization for each layout, because some stuff is inaccurate, and fixing it will make other layouts inaccurate.

For fully proper localization I'd suggest the project owner to consider using placeholders. For example:

this.views = "%view_count% views";

instead of

this.view = " views";

because the issue with the latter is that, for example, Polish version of Cosmic Panda layout had Views: 123 while English version had 123 views (source: https://next.gazeta.pl/internet/7,104530,10680124,zrob-sobie-nowego-youtube-a.html). Current localization method also makes it impossible to properly translate the upload date (as I've mentioned earlier), because it's in a different order. Something needs to be remade.

And the thing that I guess the project owner is aware of is that some text is defined in main.js and it either has to be moved to emerald.js or main.js has to import the class in some proper way.

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.

2 participants