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

Conditionals by envelope name should use LocalizeString() #25

Open
Phroneris opened this issue Apr 22, 2024 · 2 comments
Open

Conditionals by envelope name should use LocalizeString() #25

Phroneris opened this issue Apr 22, 2024 · 2 comments

Comments

@Phroneris
Copy link

Hello, thank you for providing tons of cool utilities!

I tried to use X-Raym_Set selected tempo envelope points value.lua, but nothing happened despite the tempo envelope is already selected.

I took a look into the IDE and found that env_name is set to "テンポマップ" on my REAPER v6.83 with Japanese localization.
"テンポマップ" is "tempo map" in Japanese.

So,

the env_name should be compared with reaper.LocalizeString("Tempo map", "env"), or at least reaper.LocalizeString("Tempo map", "common"), instead of bare "Tempo map".

I'm afraid that the same thing would be happening on any other scripts which detect something by name.

@X-Raym
Copy link
Owner

X-Raym commented Apr 22, 2024

@Phroneris Oh wow, I didn't know under the hood (from API), the get envelope name function returned a localized version of the string... I though it was the rough initial string. I wonder if it was always like this or if something change, cause I have tons of scripts and some where shared on French community, but this is the first report.

Thanks for detailed report and solution exploration. I'll see if I can consider put time on this, and explore a bit more this, but for now I can only ask for patience cause the number of scripts checking for envelope name at some point is quite big.

Cheers !

@Phroneris
Copy link
Author

@X-Raym The reason why I figured out the cause clearly may be that I AM the author of Japanese language pack.
If you're interested, get JPN_Phroneris.ReaperLangPack (in zip) and find entries with AEF53FB432FD3810 key under [common]/[env] sections.

FYI there used to be a similar problem with GetTrackEnvelopeByName()/GetTakeEnvelopeByName(), but it was fixed sometime ago:
https://forum.cockos.com/showpost.php?p=1966814&postcount=393
How worrisome for ReaScripters!

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

No branches or pull requests

2 participants