Dylan K. Taylor
5c2ed210fc
Merge branch 'next-minor' into next-major
2023-01-14 20:53:41 +00:00
Dylan K. Taylor
1bbe053848
Language: fixed another couple of hardcoded translation keys
2023-01-13 17:52:20 +00:00
Dylan K. Taylor
ecd8f151f1
Merge branch 'next-minor' into next-major
2023-01-12 22:08:25 +00:00
Dylan K. Taylor
81ca0c8fbf
Language: do not parse translations if the text was a plain key
...
this unintentionally allowed translations to reference other translations 1 level deep, which is not desired behaviour.
This also improves performance for the cases where formatting isn't used.
2023-01-08 20:56:12 +00:00
Dylan K. Taylor
d4b8c47a65
Language: document poorly-named function parseTranslation()
2023-01-08 16:46:25 +00:00
Dylan K. Taylor
c2918709a3
Merge branch 'next-minor' into next-major
2023-01-06 01:59:04 +00:00
Alexey
172ce659b8
Use str_starts_with, str_ends_with and str_contains instead of strpos ( #5485 )
2022-12-31 13:02:23 +00:00
Dylan K. Taylor
b6982a84ef
Merge branch 'next-minor' into next-major
2022-11-25 14:52:56 +00:00
Dylan K. Taylor
d19f0bf7be
Language: added getAll()
2022-11-15 15:27:14 +00:00
Dylan K. Taylor
7bcc663b60
Migrate core code to using symfony/filesystem
...
webmozart/path-util is retained for plugin compatibility, but is dropped in 5.0
2022-10-14 21:51:29 +01:00
Dylan K. Taylor
f88ae93897
BC break: Replaced webmozart/path-util with symfony/filesystem, closes #5332
2022-10-13 16:43:36 +01:00
Dylan K. Taylor
f80ffd8de0
Merge branch 'next-minor' into next-major
2022-09-15 13:59:21 +01:00
Dylan K. Taylor
222049927a
Language: fixed bogus callable reference in array_map
...
for some reason phpstan only reports this under checkImplicitMixed.
2022-09-02 19:15:05 +01:00
DiamondStrider1
9e0b4621be
Fixed languages-not-found bug ( #5272 )
...
* Fixed languages-not-found bug
* Update Language.php
Co-authored-by: Dylan T <odigiman@gmail.com>
2022-09-02 03:51:31 +01:00
Dylan K. Taylor
456439566b
Language: treat empty translation files the same as missing ones
2022-08-31 01:53:15 +01:00
Dylan K. Taylor
aa9f8781ff
Merge branch 'next-minor' into next-major
2022-06-07 19:56:26 +01:00
Dylan K. Taylor
083a35f970
Modernize property type declarations
2022-06-04 18:16:32 +01:00
Dylan K. Taylor
38d6284671
Use PHP-CS-Fixer to enforce file header presence
2022-06-04 17:34:49 +01:00
Dylan K. Taylor
4e956d5d1d
Replace remaining disallowed operators
2022-01-20 19:23:19 +00:00
Dylan K. Taylor
889d048ca3
Make use of Utils::assumeNotFalse() in a bunch of places
...
I've stuck to only doing this in the places where I'm sure we should never get false back. Other places I'm less sure of (and I found more bugs along the way).
2021-12-08 19:39:04 +00:00
Dylan K. Taylor
3c754b079c
Move resources/locale to Composer dependency
...
all remaining submodules are now non-essential to running a server.
They are also versioned and updates can be done automatically using 'composer update'.
Finally, we can also put an end to the issue of translations being rendered incorrectly or being missing due to outdated submodules.
2021-11-06 00:32:58 +00:00
Dylan K. Taylor
5da90b9530
Stop auto-translating strings when not asked
...
fixes #4371
2021-08-15 20:44:27 +01:00
Dylan K. Taylor
39cdf23bd5
Language: Attempt to treat parameters as translation keys, even if they don't have %prefixes
...
%prefixes should only be necessary for embedded translations where the key isn't at the start of the string.
Longer term we should just drop raw string translation entirely and just translate Translatables exclusively, but this is a stepping stone.
2021-08-15 20:00:58 +01:00
Dylan K. Taylor
789a669395
Rename TranslationContainer -> Translatable
2021-08-15 16:17:46 +01:00
Dylan K. Taylor
8b9d7d6390
Support for nested TranslationContainers
2021-08-14 20:57:13 +01:00
Dylan K. Taylor
94e16f416d
Added KnownTranslationKeys (generated) and start using it
2021-06-29 22:46:04 +01:00
Dylan T
32d7b1e6af
Start using webmozart/pathutil for joining paths ( #4287 )
2021-06-29 19:40:43 +01:00
Dylan K. Taylor
111f4b3778
Merge commit '2b6dcbc2e2f1dc8d629225c19cbcedfb9ae969c4'
...
# Conflicts:
# resources/vanilla
2020-06-26 18:46:29 +01:00
Dylan K. Taylor
4c51f1dda3
Scrap TextContainer, make TranslationContainer immutable
...
TextContainer provided zero real value as a base of TranslationContainer, given that it required its own logic to be handled wherever accepted. As such, it's no better than a simple string.
Removing it also allows fixing an ambiguity when embedding translations inside other translations, allowing it to be made immutable.
2020-02-08 13:38:27 +00:00
Dylan K. Taylor
fb1126797a
Merge branch 'stable'
2020-02-07 18:13:55 +00:00
Dylan K. Taylor
cc33c8155f
Language: specify key type for lang and fallbackLang fields
2020-02-01 20:20:39 +00:00
Dylan K. Taylor
ff63f6d055
fill in more iterable types (master)
2020-02-01 20:19:57 +00:00
Dylan K. Taylor
cb16f5c142
Merge commit '260ac47588c76a2e6814cfba46773a990fb8c5da'
...
# Conflicts:
# resources/vanilla
# src/Server.php
# src/lang/Language.php
# src/network/mcpe/protocol/AddItemActorPacket.php
# src/network/mcpe/protocol/AddPlayerPacket.php
# src/network/mcpe/protocol/SetActorDataPacket.php
# src/network/mcpe/serializer/NetworkBinaryStream.php
# src/permission/Permission.php
# src/pocketmine/block/Leaves.php
# src/pocketmine/entity/DataPropertyManager.php
# src/pocketmine/entity/Entity.php
# src/pocketmine/item/Banner.php
# src/pocketmine/item/Item.php
# src/pocketmine/level/format/io/LevelProvider.php
# src/pocketmine/level/format/io/LevelProviderManager.php
# src/pocketmine/network/mcpe/protocol/AddActorPacket.php
# src/pocketmine/network/mcpe/protocol/LoginPacket.php
# src/pocketmine/tile/Banner.php
# src/scheduler/BulkCurlTask.php
# src/updater/AutoUpdater.php
# src/utils/Config.php
# src/utils/Utils.php
# src/world/generator/Flat.php
# src/world/generator/Generator.php
2020-01-31 21:07:34 +00:00
Dylan K. Taylor
301460a0ea
Merge commit '8bf469f7fcd428ebc8c3c9b9ab777c79e2824c67'
...
# Conflicts:
# resources/vanilla
# src/lang/Language.php
2020-01-31 19:22:14 +00:00
Dylan K. Taylor
67bcc1c0fb
phpdoc armageddon for master, pass 1
2020-01-22 11:55:03 +00:00
Dylan K. Taylor
3ee6887792
populate remaining missing return types, using native returns where possible
...
this is done separately to stable so that stable changes can be integrated easily using an empty merge.
2020-01-19 10:26:35 +00:00
Dylan K. Taylor
c36377ea5a
Merge branch 'next-minor'
2019-12-12 19:47:12 +00:00
Dylan K. Taylor
5499ac620c
Removed pocketmine subdirectory, map PSR-4 style
2019-07-30 19:14:57 +01:00