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

Cannot load any user language files for i18n #722

Closed
processing-bot opened this issue May 17, 2023 · 2 comments
Closed

Cannot load any user language files for i18n #722

processing-bot opened this issue May 17, 2023 · 2 comments

Comments

@processing-bot
Copy link
Collaborator

Created by: yu-tang

Description

I read a translations wiki page.

https://github.com/processing/processing4/wiki/Translations#two-ways-to-get-started

So I attempted using a user language file but have no luck.
My PDE simply ignores them.

Expected Behavior

The PDE uses user base/language files for i18n from my sketchbook folder if they are available.

Current Behavior

No user language files allowed.
No errors, just treat them like they are invisible.

Steps to Reproduce

  1. Put the following modified files in your sketchbook folder.
    • languages/PDE.properties
    • languages/PDE_ja.properties
      I don't think it's a Japanese language specific, so feel free to replace above with your language file.
  2. Run PDE.
  3. See if your changes has been applied. (No, in my case)

Your Environment

Processing 4.2 + Windows 10

Possible Causes / Solutions

I quick look at a processing/app/Language.java.

Language.init() internally calls Base.getSketchbookFolder() via LanguageBundle for building a user language file path.
But the Base.getSketchbookFolder() seems always returns null at that point because the Preferences class is not initialized yet.

@processing-bot
Copy link
Collaborator Author

Created by: trikaphundo

I observe the very same behaviour on my Ubuntu 22.04.2 with Processing 4.2. Processing does not take into account the .properties files under languages folder in the sketchbook.

A simple workaround is editing the PDE_ja.properties file directly in lib/languages. I recommend you backup the file before modifying it, though.

@processing-bot
Copy link
Collaborator Author

Created by: benfry

Sorry about that—as you found, the sketchbook isn't initialized yet so it's really tricky to get this right.

I've updated the instructions: https://github.com/processing/processing4/wiki/Translations#two-ways-to-get-started

Thanks for looking into a translation for us!

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant