-
Notifications
You must be signed in to change notification settings - Fork 125
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
Readable Content and Title fields aren't detected during POT generation for localization #358
Comments
Hm... that is odd. I haven't really looked into localization with Godot so my help will be very limited. On the back end, all of these exported variables are strings, the interaction text as well as the readable title and content. So they should all work the same. My first guess would be that it's more about the component scene / object scene instances, but then you'd probably have the same issue with the interaction text, so that's what baffles me a bit. |
Okay I took a quick look at how POT generation works. As it goes by resource, you'd have to add each individual scene to it. Packed Scenes within scenes don't seem to get properly detected by the POT generator. Another issue that comes up with this is that if you reuse Components that are packed scenes and you add those scenes to the POT resources, that translation will be applied to all of them. This is probably fine for stuff like the interaction prompts like "Read this", but you don't want all your readable objects have the same content. In order for this to work you will have to make the readable component "local" to your object. As an example I've taken the Note how the names of the child nodes of the ReadableComponent are white as they are now all part of the Note_Welcome scene. Then I add the Note_Welcome scene to the POT Generator resources: In the end, all these strings now show up in the POT file: So in summary: It's doable but needs some planning in how you structure your objects and their components. |
Discussed in #357
Originally posted by MithosKuu January 16, 2025
![image](https://private-user-images.githubusercontent.com/65877320/404126839-0a3a2d27-5f8f-4c32-aade-c1e3a42e2a9a.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMDkwNjcsIm5iZiI6MTczOTAwODc2NywicGF0aCI6Ii82NTg3NzMyMC80MDQxMjY4MzktMGEzYTJkMjctNWY4Zi00YzMyLWFhZGUtYzFlM2E0MmUyYTlhLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA5NTkyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUxNDQ5ODg3Mjg2ZGIzMDI5Njc4MTBmOTBhNjY5YmMzMTQ2YzFkOTYyYjIyYzc2NmIwZTcyMDdhNjBkMjQyZjkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.NcMtXUjzfuD2iey1wgrKAuBp9wKIIXkCH_V8udoF5VI)
![image](https://private-user-images.githubusercontent.com/65877320/404124547-99e8902a-fc3a-48a6-b664-ae56379323a1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMDkwNjcsIm5iZiI6MTczOTAwODc2NywicGF0aCI6Ii82NTg3NzMyMC80MDQxMjQ1NDctOTllODkwMmEtZmMzYS00OGE2LWI2NjQtYWU1NjM3OTMyM2ExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA5NTkyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmNjNhZjcwYTJhNzc4NjYzODM0MDBlOWYyYjdkZDQ2NTVjZjg1NGJkY2MwOTRlMGJkOTcxN2VjODYyYTJjN2EmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.5zDA7Dm_6V5ZXRlOvLPiLZuIm1Yry_U3w4kKL4D8OrI)
![image](https://private-user-images.githubusercontent.com/65877320/404127985-18462983-95e8-439d-b74e-ac14c7d714e9.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMDkwNjcsIm5iZiI6MTczOTAwODc2NywicGF0aCI6Ii82NTg3NzMyMC80MDQxMjc5ODUtMTg0NjI5ODMtOTVlOC00MzlkLWI3NGUtYWMxNGM3ZDcxNGU5LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA5NTkyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTdjOWI5Zjg4Y2RkNmZjNTAxNWEzNmY4NGVmMTg3MWQ4ODNiNjc3YzUxYTc4NzM5NzBlNDA2MzZiZWQxZTkwZGMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.tL4hncuzwF8sEocjkKylqBie_tHXEVpCgnNEGvc87pU)
![image](https://private-user-images.githubusercontent.com/65877320/404128080-03bc4c0a-5fc8-419d-ac2b-2b9ed829d4be.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMDkwNjcsIm5iZiI6MTczOTAwODc2NywicGF0aCI6Ii82NTg3NzMyMC80MDQxMjgwODAtMDNiYzRjMGEtNWZjOC00MTlkLWFjMmItMmI5ZWQ4MjlkNGJlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmV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asseRtfU)
![image](https://private-user-images.githubusercontent.com/65877320/404128439-efbba70e-fe77-4d16-93e5-15c04416a7c1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwMDkwNjcsIm5iZiI6MTczOTAwODc2NywicGF0aCI6Ii82NTg3NzMyMC80MDQxMjg0MzktZWZiYmE3MGUtZmU3Ny00ZDE2LTkzZTUtMTVjMDQ0MTZhN2MxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA4VDA5NTkyN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc4MzA1MjkwZDhkOTExYTM5MjJhZmY2NDQ4ZGFlZDc3M2U0Zjk5NjI3NjAxNTUzNTU3NDgwNzJhZjU0NmZkNjYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.WivSgrOQT5_UJB5PErVULRXymBNJZnQJkI_Lp5e5lzc)
I'm messing around with localization and am hitting an issue with the Readable Component. The Interaction Text field is getting detected as a valid string to be localized during POT generation, but the Readable Content and Title fields are not.
Strangely Godot does see them as valid and translates them if I set them to an existing string
The text was updated successfully, but these errors were encountered: