mirror of
https://github.com/godotengine/godot.git
synced 2024-11-21 19:42:43 +00:00
Merge pull request #97273 from timothyqiu/unicode-autoload
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
🔗 GHA / 🪲 Godot CPP (push) Has been cancelled
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
🔗 GHA / 🪲 Godot CPP (push) Has been cancelled
Allow using Unicode identifier for Autoload name
This commit is contained in:
commit
e4e024ab88
@ -88,14 +88,9 @@ void EditorAutoloadSettings::_notification(int p_what) {
|
||||
}
|
||||
|
||||
bool EditorAutoloadSettings::_autoload_name_is_valid(const String &p_name, String *r_error) {
|
||||
if (!p_name.is_valid_ascii_identifier()) {
|
||||
if (!p_name.is_valid_unicode_identifier()) {
|
||||
if (r_error) {
|
||||
*r_error = TTR("Invalid name.") + " ";
|
||||
if (p_name.size() > 0 && p_name.left(1).is_numeric()) {
|
||||
*r_error += TTR("Cannot begin with a digit.");
|
||||
} else {
|
||||
*r_error += TTR("Valid characters:") + " a-z, A-Z, 0-9 or _";
|
||||
}
|
||||
*r_error = TTR("Invalid name.") + " " + TTR("Must be a valid Unicode identifier.");
|
||||
}
|
||||
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user