lightbeam24 / CustomTube

Choose your own YouTube layout, plus some other settings!
MIT License
109 stars 10 forks source link

New localization strings (WIP) #193

Open VexorionReal opened 7 months ago

VexorionReal commented 7 months ago

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 commented 7 months ago

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..

Lort533 commented 7 months ago

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 commented 7 months ago

Okay.

Lort533 commented 7 months ago

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.