RedMser / godot-fluent-translation

Fluent Translation as Godot extension
https://godotengine.org/asset-library/asset/2937
Other
13 stars 0 forks source link

Replace complex Project Settings with a plug-in API #35

Open RedMser opened 2 months ago

RedMser commented 2 months ago

Many project settings are too complex for their own good, using RegEx or Dictionary for very complex lookups and string manipulation.

Instead it would be good to have a plug-in API that allows the user to implement virtual methods like func _compute_locale(path: String) -> String which could in the end just do a RegEx lookup, but also anything else.

Not sure about the registration mechanism, since it would need to be available as soon as ResourceLoader is ready (during project startup). Maybe refer to plug-in classes by path or by class_name in ProjectSettings?

May depend on https://github.com/godot-rust/gdext/issues/426

RedMser commented 1 week ago

One small UX improvement before this is done, we could use typed dictionaries to make the project settings nicer to edit. Need to check how to provide these type hints, and if it is possible through godot-rust...