Commit Graph

62 Commits

Author SHA1 Message Date
rune-scape
0dde931bc9 StringName: Fix empty hash
+Fixed compat hashes
2024-09-09 13:30:02 -07:00
Haoyu Qiu
7343dc3a5d Split TranslationServer into its own file 2024-08-15 15:00:47 +08:00
Rémi Verschelde
f11e8d033d
Remove editor pseudolocalization debug feature
We've seen multiple users enable it by mistake and get utterly confused,
reporting as a bug that the interface text is garbled.

On the other hand we haven't really seen much use of the feature by editor
UI developers, so we can likely simply remove it.

If there's a need eventually, we can re-add it as a command line option
(which is also better than an editor setting as one would typically want
to toggle it during development).
2024-06-24 17:08:26 +02:00
Aaron Franke
b1f5e9fe3a
Rename internal is_ascii_char to is_ascii_alphabet_char 2024-04-20 02:36:41 -07:00
Haoyu Qiu
479b7afa8e Add context support for editor property name i18n 2024-03-31 18:40:14 +08:00
Rémi Verschelde
0a089e284b
Merge pull request #87191 from Mickeon/autocompletion-TranslationServer
Add autocompletion for TranslationServer
2024-03-01 14:56:18 +01:00
Micky
ffd498c57d Add autocompletion for TranslationServer 2024-02-29 20:43:19 +01:00
Michael Alexsander
d70c45b5c8
Add option to add built-in strings in the POT generation 2024-02-28 11:34:26 -03:00
Raul Santos
5ba92e5a57
Fix some DEFVALs to use the right type
- Use `StringName()` in DEFVAL for StringNames.
- Use `Variant()` in DEFVAL for Variants.
2024-02-23 01:50:18 +01:00
bruvzg
e7bdb60e56
[Pseudolocalization] Prevent out of bounds reads. 2024-01-05 14:10:26 +02:00
bruvzg
829349d2ca
Do not reload resources and send notification if locale is not changed. 2023-12-05 16:17:22 +02:00
bruvzg
8b2260544a
Fix remapped font reloading on locale change. 2023-11-13 21:25:41 +02:00
Pedro J. Estébanez
5301bbb3a5 Support loading of translations on threads 2023-06-29 16:48:55 +02:00
Clay John
610877e326
Merge pull request #72288 from MewPurPur/use-string-repeat
Use `String.repeat()` to optimize several String methods
2023-05-05 09:56:48 -07:00
VolTer
6b84e258d2 Use String.repeat() in more places 2023-05-01 02:27:46 +02:00
bruvzg
82d7923c65
Improve layout direction/locale automatic selection. 2023-02-22 08:37:14 +02:00
Haoyu Qiu
5d7e003b29
Prepare for moving editor and classref translations to godot-editor-l10n repo
- Separate editor interface and property translations.
- Add property translation in TranslationServer.
- The split and merge of the POT/PO/Makefiles and extract scripts is done
  directly in godot-editor-l10n, the files will be removed in the next commit.
- Remove the hardcoded "to_include" lists from the SCsub, we'll only commit the
  files which are ready to inclue.
2023-02-07 14:20:40 +01:00
Rémi Verschelde
163f6f5fe8
Merge pull request #68429 from KoBeWi/PropertySettings
Add PropertyInfo overload for GLOBAL_DEF
2023-01-06 22:59:29 +01:00
Rémi Verschelde
d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
kobewi
7c6b659bd7 Add PropertyInfo overload for GLOBAL_DEF 2022-12-11 21:36:48 +01:00
bruvzg
35528b800c
[Font] Add an import option to pre-render all glyphs required for the translation. 2022-11-10 10:43:15 +02:00
Rémi Verschelde
0e9878b12a
Merge pull request #67931 from bruvzg/locale_no_def
Do not auto add default script and country codes to the locale.
2022-10-31 14:30:18 +01:00
bruvzg
ec3c4fcba9
Do not auto add default script and country codes to the locale. 2022-10-27 09:31:05 +03:00
kobewi
e48c5daddf Unify usage of GLOBAL/EDITOR_GET 2022-10-18 19:01:48 +02:00
bruvzg
0103af1ddd
Fix MSVC warnings, rename shadowed variables, fix uninitialized values, change warnings=all to use /W4. 2022-10-07 11:32:33 +03:00
kobewi
f7f4873ed0 Replace Array return types with TypedArray 3 2022-08-24 12:53:36 +02:00
Yuri Sizov
1362bc22bd Add tests for empty/unnamed arguments to ClassDB, Variant, GDScript 2022-08-08 16:36:01 +03:00
Aaron Record
900c676b02 Use range iterators for RBSet in most cases 2022-05-19 12:09:16 +02:00
reduz
746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
bruvzg
f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +03:00
bruvzg
759ca45820
[Editor] Fix "en" editor translation detection. 2022-02-18 22:15:02 +02:00
Hendrik Brucker
77fb65debf Use EditorFileDialog instead of FileDialog in the project manager 2022-02-12 12:06:51 +01:00
bruvzg
b801742b77
[GDExtension] Add binds for missing methods, operators, and constants required for GDExtension TextServer implementation. 2022-02-08 09:49:14 +02:00
bruvzg
244db37508
Cleanup and move char functions to the char_utils.h header. 2022-02-04 11:35:01 +02:00
bruvzg
9456454109
Fix translation with multiple sources for the same language.
Remove unnecessary locale length checks.
Add "C" -> "en" locale remap.
2022-01-24 18:58:16 +02:00
bruvzg
de48d5101b
Fix locale always selecting translation instead of "en", when no match found. 2022-01-19 16:46:48 +02:00
bruvzg
40c56ed410
Improve locale detection.
Use separate language, script and country lists.
Add locale selection dialog and property hint.
2022-01-18 14:30:00 +02:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
raphaelazev
82527df55c Added check to get_all_locales to avoid adding duplicate locales to array 2021-12-10 19:25:59 -03:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Hugo Locurcio
c012fbc8b2
Rename PROPERTY_USAGE_NOEDITOR to PROPERTY_USAGE_NO_EDITOR
This is consistent with other constants that include `NO`,
such as `PROPERTY_HINT_COLOR_NO_ALPHA`.
2021-11-03 23:06:17 +01:00
Rémi Verschelde
3b11e33a09
clang-format: Disable alignment of operands, too unreliable
Sets `AlignOperands` to `DontAlign`.

`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
2021-10-28 15:19:35 +02:00
Rémi Verschelde
2ac320681a
Merge pull request #53225 from aaronfranke/c-locale 2021-10-05 11:20:08 +02:00
Rémi Verschelde
b85dfd990e
GDScript completion: Handle quote style ad-hoc to remove editor dependency
`core` and `scene` shouldn't depend on `editor`, so they can't query this style
setting in `get_argument_options`. But we can handle it after the fact in
GDScript's completion code.

Also cleans up a couple extra unused invalid includes in `core`.
2021-10-04 16:16:05 +02:00
Lightning_A
c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
Aaron Franke
1cbec15084
Add locale rename for the "C" locale 2021-09-29 11:57:53 -05:00
O01eg
9302b6547a
Implement override of get_message and get_plural_message 2021-09-29 14:19:14 +03:00
Rémi Verschelde
73cd3f0b38
Merge pull request #51395 from angad-k/pseudolocalization-squashed
Add pseudolocalization to Godot. (GSoC'21)
2021-08-08 17:55:30 +02:00
Angad Kambli
e79dde1cbb add pseudolocalization to Godot 2021-08-08 20:37:57 +05:30
Rémi Verschelde
ac3322b0af
Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00