-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5e33ef3
commit d0a85a6
Showing
3 changed files
with
28 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
extends EditorTranslationParserPlugin | ||
|
||
func _parse_file(path: String, msgids: Array[String], msgids_context_plural: Array[Array]) -> void: | ||
var res := ResourceLoader.load(path) | ||
if not res: return | ||
if not res is Quest: return | ||
for property in res.get_script().get_script_property_list(): | ||
if property.type != 4: continue # If the property is not a string, we skip it | ||
# Here we check if the property is an exported variable | ||
if property.usage & PROPERTY_USAGE_STORAGE or property.usage & PROPERTY_USAGE_SCRIPT_VARIABLE: | ||
msgids.append("quest_%s/%s"% [res.id, property["name"]]) # quest_1/quest_name | ||
var res := ResourceLoader.load(path) | ||
if not res: return | ||
if not res is Quest: return | ||
for property in res.get_script().get_script_property_list(): | ||
if property.type != 4: continue # If the property is not a string, we skip it | ||
# Here we check if the property is an exported variable | ||
if property.usage & PROPERTY_USAGE_STORAGE or property.usage & PROPERTY_USAGE_SCRIPT_VARIABLE: | ||
msgids.append("quest_%s/%s"% [res.id, property["name"]]) # quest_1/quest_name | ||
|
||
func _get_recognized_extensions() -> PackedStringArray: | ||
return ['tres'] | ||
return ['tres'] |