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

[Feature] Localization #4067

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from

Conversation

MidyGamy
Copy link
Contributor

I found issues #3896 about adding localization.
And after that also PR #3985 where EliteMasterEric mention using FireTongue...

This PR is meant to start it and allow you to gain some time with it.

@github-actions github-actions bot added large and removed large labels Jan 30, 2025
@Hundrec Hundrec added type: enhancement Involves an enhancement or new feature. status: pending triage Awaiting review. size: large A large pull request with more than 100 changes. pr: haxe PR modifies game code. and removed Haxe labels Jan 30, 2025
Copy link

@charlesisfeline charlesisfeline left a comment

Choose a reason for hiding this comment

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

tbh this and #3985's FunkinText is such a match made in heaven

@MidyGamy
Copy link
Contributor Author

Well... there is the beningin (that writing error was totally wanted)
image

@MidyGamy
Copy link
Contributor Author

MidyGamy commented Jan 30, 2025

Ok I might have an issue...
I'm trying to add
<label id="fr-FR" language="French" region="France"/>
into the en-US <local/> with Polymod...
But, with _append it deletes the other things in it (as expected but wanted to try)
And with _merge well nothing happens...
I tried applying the <merge/> to both <local/> and <label/>

@MidyGamy
Copy link
Contributor Author

Or it's just maybe cause I forgot a /. I'll try later

@MidyGamy
Copy link
Contributor Author

No seriously... WHAT IS THIS EXAMPLE???
image

there is a random <\mode> node...

But I can't manage to add a node to an existing one... only replace one

@@ -313,7 +313,7 @@ class StoryMenuState extends MusicBeatState

highScoreLerp = Std.int(MathUtil.smoothLerp(highScoreLerp, highScore, elapsed, 0.25));

scoreText.text = 'LEVEL SCORE: ${Math.round(highScoreLerp)}';
scoreText.text = Localization.tongue.get("$LEVEL_SCORE", "story_menu") + ' ${Math.round(highScoreLerp)}';
Copy link
Contributor

Choose a reason for hiding this comment

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

Super small nitpick but it would be nice if you could set up localization so that the value could positioned be anywhere in the translated text, since for instance Arabic is read from right to left

Marginally better system than mine either way!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I will work on it

@github-actions github-actions bot added the large label Jan 31, 2025
@github-actions github-actions bot added Haxe and removed large labels Jan 31, 2025
@Hundrec Hundrec removed the Haxe label Feb 1, 2025
@7oltan
Copy link
Contributor

7oltan commented Feb 1, 2025

amazing pr!

@7oltan
Copy link
Contributor

7oltan commented Feb 1, 2025

would love to see this with languages that have custom letters for example chinese and arabic but thats too expensive for the funkin team i think

@MidyGamy
Copy link
Contributor Author

MidyGamy commented Feb 1, 2025

would love to see this with languages that have custom letters for example chinese and arabic but thats too expensive for the funkin team i think

Well for fonts directly used by flixel, that won't be a huge problem (they could use the unifont at any moment)
For text using sprite sheets... Indeed that will be expensive, but I don't think that will be that long.
The most expensive part of it I think will be rethinking every menus for languages with right to left writing (like Arabic)

Copy link
Collaborator

@AbnormalPoof AbnormalPoof left a comment

Choose a reason for hiding this comment

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

There appears to be some commented out code you added throughout your changes. The style guide advises against leaving commented out code, please remove them!

Overall though, this PR looks great and could really help save the devs time!

@AbnormalPoof AbnormalPoof added status: needs revision Cannot be approved because it is awaiting some work by the contributor. and removed status: pending triage Awaiting review. labels Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: haxe PR modifies game code. size: large A large pull request with more than 100 changes. status: needs revision Cannot be approved because it is awaiting some work by the contributor. type: enhancement Involves an enhancement or new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants