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

Fix "as" capitalization in editor strings #83815

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Conversation

timothyqiu
Copy link
Member

It's awkward to have both "Embed As Basis Universal" and "Embed as Uncompressed".

@timothyqiu timothyqiu added this to the 4.2 milestone Oct 23, 2023
@timothyqiu timothyqiu requested a review from a team as a code owner October 23, 2023 03:08
@akien-mga
Copy link
Member

akien-mga commented Oct 23, 2023

We seem to have other occurrences of "As" being capitalized in strings:

$ rg '"[^"]* As [^"]*"' -g'!*.po*'
editor/filesystem_dock.cpp
2906:                                   p_popup->add_icon_item(get_editor_theme_icon(SNAME("PlayScene")), TTR("Set As Main Scene"), FILE_MAIN_SCENE);

editor/import/resource_importer_obj.cpp
520:    return "OBJ As Mesh";

editor/scene_tree_dock.cpp
1043:                                           placeholder_editable_instance_remove_dialog->set_text(TTR("Enabling \"Load As Placeholder\" will disable \"Editable Children\" and cause all properties of the node to be reverted to their default."));
3152:                                   menu->add_check_item(TTR("Load As Placeholder"), TOOL_SCENE_USE_PLACEHOLDER);
3158:                                   menu->set_item_checked(menu->get_item_idx_from_text(TTR("Load As Placeholder")), placeholder);

modules/gltf/editor/editor_scene_importer_gltf.cpp
80:     r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::INT, "gltf/embedded_image_handling", PROPERTY_HINT_ENUM, "Discard All Textures,Extract Textures,Embed As Basis Universal,Embed as Uncompressed", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), GLTFState::HANDLE_BINARY_EXTRACT_TEXTURES));

modules/gltf/gltf_state.cpp
127:    ADD_PROPERTY(PropertyInfo(Variant::INT, "handle_binary_image", PROPERTY_HINT_ENUM, "Discard All Textures,Extract Textures,Embed As Basis Universal,Embed as Uncompressed", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_handle_binary_image", "get_handle_binary_image"); // enum

But we also have a lot of occurrences with "as":

$ rg '"[^"]*[A-Z][a-z]+ as [A-Z][^"]*"' -g'!*.po*'
CHANGELOG.md
2321:- "Set as Main Scene" context option for scenes in the FileSystem dock.

doc/classes/EditorImportPlugin.xml
215:                            Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh".

editor/animation_track_editor.cpp
6078:                   undo_redo->create_action(TTR("Bake Animation as Linear Keys"));

editor/debugger/editor_debugger_tree.cpp
118:    item_menu->add_icon_item(get_editor_theme_icon(SNAME("CreateNewSceneFrom")), TTR("Save Branch as Scene"), ITEM_MENU_SAVE_REMOTE_NODE);

editor/editor_properties.cpp
3040:   menu->get_popup()->add_item(TTR("Copy as Text"), ACTION_COPY);

editor/editor_settings.cpp
741:    String screen_hints = "Same as Editor:-5,Previous Screen:-4,Next Screen:-3,Primary Screen:-2"; // Note: Main Window Screen:-1 is not used for the main window.
749:    String android_window_hints = "Auto (based on screen size):0,Same as Editor:1,Side-by-side with Editor:2";

editor/import_dock.cpp
362:    preset->get_popup()->add_item(vformat(TTR("Set as Default for '%s'"), params->importer->get_visible_name()), ITEM_SET_AS_DEFAULT);

editor/scene_tree_dock.cpp
953:                            accept->set_text(TTR("Can't save a branch which is a child of an already instantiated scene.\nTo save this branch into its own scene, open the original scene, right click on this branch, and select \"Save Branch as Scene\"."));
959:                            accept->set_text(TTR("Can't save a branch which is part of an inherited scene.\nTo save this branch into its own scene, open the original scene, right click on this branch, and select \"Save Branch as Scene\"."));
3131:                   menu->set_item_text(menu->get_item_index(TOOL_TOGGLE_SCENE_UNIQUE_NAME), node->is_unique_name_in_owner() ? TTR("Revoke Unique Name") : TTR("Access as Unique Name"));
3856:   ED_SHORTCUT("scene_tree/paste_node_as_sibling", TTR("Paste as Sibling"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::V);
3867:   ED_SHORTCUT("scene_tree/save_branch_as_scene", TTR("Save Branch as Scene"));
3869:   ED_SHORTCUT("scene_tree/toggle_unique_name", TTR("Toggle Access as Unique Name"));

modules/gltf/editor/editor_scene_importer_gltf.cpp
80:     r_options->push_back(ResourceImporterScene::ImportOption(PropertyInfo(Variant::INT, "gltf/embedded_image_handling", PROPERTY_HINT_ENUM, "Discard All Textures,Extract Textures,Embed As Basis Universal,Embed as Uncompressed", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED), GLTFState::HANDLE_BINARY_EXTRACT_TEXTURES));

modules/gltf/gltf_state.cpp
127:    ADD_PROPERTY(PropertyInfo(Variant::INT, "handle_binary_image", PROPERTY_HINT_ENUM, "Discard All Textures,Extract Textures,Embed As Basis Universal,Embed as Uncompressed", PROPERTY_USAGE_STORAGE | PROPERTY_USAGE_INTERNAL | PROPERTY_USAGE_EDITOR), "set_handle_binary_image", "get_handle_binary_image"); // enum

modules/mono/editor/GodotTools/GodotTools/GodotSharpEditor.cs
604:                ["hint_string"] = "View as List,View as Tree",

modules/websocket/emws_peer.cpp
111:    WARN_PRINT_ONCE("Acting as WebSocket server is not supported in Web platforms.");

platform/ios/export/export_plugin.cpp
239:    r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "storyboard/image_scale_mode", PROPERTY_HINT_ENUM, "Same as Logo,Center,Scale to Fit,Scale to Fill,Scale"), 0));

scene/gui/line_edit.cpp
2397:   menu_dir->add_radio_check_item(RTR("Same as Layout Direction"), MENU_DIR_INHERITED);

scene/gui/text_edit.cpp
6853:   menu_dir->add_radio_check_item(RTR("Same as Layout Direction"), MENU_DIR_INHERITED);

tests/core/io/test_file_access.h
85:TEST_CASE("[FileAccess] Get as UTF-8 String") {

Should we try to unify them all?

@timothyqiu timothyqiu requested a review from a team as a code owner October 23, 2023 08:11
@timothyqiu timothyqiu changed the title Fix "as" capitalization in glTF import options Fix "as" capitalization in editor strings Oct 23, 2023
@akien-mga akien-mga merged commit 5e8bf6a into godotengine:master Oct 23, 2023
15 checks passed
@akien-mga
Copy link
Member

Thanks!

@timothyqiu timothyqiu deleted the as branch October 23, 2023 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants