-
Notifications
You must be signed in to change notification settings - Fork 483
Dev Archipelago: Translate Basics islands to Spanish #2845
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2d83726
Locale: Regenerate the POT file
manuq a67eeab
Update Spanish translation
manuq 3f34e8d
Locale: Add Dev Archipelago Basics scenes to template
manuq 751d5c9
Update Spanish translation
manuq 78b760b
Locale: Add Basics Elder dialogue to template
manuq c0b20db
Update Spanish Translation
manuq 7ee7a97
ThreadbareEditor addon: Add translation parser for quests
manuq 1c31218
Locale: Add title and description of Dev Basics quests
manuq a35dbdc
Update Spanish Translation
manuq 535a13f
Update addons/threadbare_editor/quest_translation_parser.gd
manuq 5a95e6b
Dialogue Manager: Disable using Static IDs from settings
manuq File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,7 +1,7 @@ | ||
| [plugin] | ||
|
|
||
| name="ThreadbareEditor" | ||
| description="Adds an editor debugger." | ||
| description="Threadbare editor integrations: a debugger and a translation parser." | ||
| author="The Threadbare Authors" | ||
| version="" | ||
| script="plugin.gd" |
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # SPDX-FileCopyrightText: The Threadbare Authors | ||
| # SPDX-License-Identifier: MPL-2.0 | ||
| @tool | ||
| extends EditorTranslationParserPlugin | ||
| ## Extracts the translatable strings of a [Quest] resource. | ||
| ## | ||
| ## A [Quest] is a custom resource, so by default is not recognized by the translation system. | ||
| ## This parser makes it possible, so adding a quest.tres to the list of translatable | ||
| ## files puts its title and description in the catalog. | ||
|
|
||
| const TITLE_COMMENT := "Quest title" | ||
| const DESCRIPTION_COMMENT := "Quest description" | ||
|
|
||
|
|
||
| func _get_recognized_extensions() -> PackedStringArray: | ||
| return ResourceLoader.get_recognized_extensions_for_type("Quest") | ||
|
|
||
|
|
||
| func _parse_file(path: String) -> Array[PackedStringArray]: | ||
| var messages: Array[PackedStringArray] = [] | ||
|
|
||
| # Skip .tres files that aren't Quests. | ||
| var quest := ResourceLoader.load(path, "", ResourceLoader.CACHE_MODE_IGNORE) as Quest | ||
| if not quest: | ||
| return messages | ||
|
|
||
| if quest.title: | ||
| messages.append(PackedStringArray([quest.title, "", "", TITLE_COMMENT])) | ||
| if quest.description: | ||
| messages.append(PackedStringArray([quest.description, "", "", DESCRIPTION_COMMENT])) | ||
|
|
||
| return messages |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| uid://v8n7t54c7iqy |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow. I expected that there would be some vfunc on nodes/resources that gets translations for their properties; or maybe some property export flag that means "translate me". But no! In fact the built-in translations of properties of scenes is an implementation of EditorTranslationParserPlugin with loads of hardcoded special cases, e.g. "If a node is a direct child of a
TabContainer, then itsnameshould be translated".There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good to know! Great source to use as reference too. For example, the use of
get_recognized_extensions_for_type().