Commit Graph

85 Commits

Author SHA1 Message Date
aa9f8781ff Merge branch 'next-minor' into next-major 2022-06-07 19:56:26 +01:00
083a35f970 Modernize property type declarations 2022-06-04 18:16:32 +01:00
38d6284671 Use PHP-CS-Fixer to enforce file header presence 2022-06-04 17:34:49 +01:00
3b7e274c34 Server: localize 'forcing server shutdown' message 2022-05-11 14:54:29 +01:00
212c94ce98 PluginManager: Log an error message when a plugin disables itself during enabling 2022-05-11 13:07:45 +01:00
3353a00641 List command aliases in /help <commandName> 2022-04-10 21:32:46 +01:00
ac3a6033b9 PluginManager: account for possible abstract main classes
idk why anyone does this, but it shouldn't cause a core crash ...
2022-04-01 23:42:37 +01:00
4e956d5d1d Replace remaining disallowed operators 2022-01-20 19:23:19 +00:00
8532e9c8e0 Merge remote-tracking branch 'origin/stable' into next-minor 2022-01-04 14:38:15 +00:00
0d595e4324 Update Language dependency 2022-01-04 00:47:04 +00:00
57e1509c3a Updated translation APIs 2021-12-15 03:24:13 +00:00
c04b00d09d Updated Language to 2.2.0 2021-12-15 02:15:24 +00:00
8a94aa10a4 Merge branch 'stable' into next-minor 2021-12-14 00:34:54 +00:00
c334e6dec7 Updated locale-data dependency 2021-12-14 00:31:44 +00:00
e06eefeab0 build/generate-known-translation-apis: fixed incorrect positional parameter order
closes #4639
2021-12-11 21:28:52 +00:00
ede07c4314 Mark KnownTranslationKeys and KnownTranslationFactory as @internal 2021-12-11 21:24:18 +00:00
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
e4754ab029 PluginBase: Improved error messages for commands containing illegal characters 2021-11-12 00:16:53 +00:00
6b316dc29a PluginManager: Make declaration of duplicate permissions a load error 2021-11-06 17:05:37 +00:00
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
7e4be29fc4 Gracefully force-shutdown on failure to start RakLib
this now won't generate a crashdump.
2021-11-02 13:51:01 +00:00
aa408c9a97 Fixed 9646128d01 2021-10-20 21:54:57 +01:00
34f54750c8 Added support for creation-time validation of generator options, closes #2717 2021-10-11 17:37:47 +01:00
e1ee320c8d PluginManager: Localize plugin loading error messages 2021-10-11 00:58:33 +01:00
ccc881ee58 Switch to custom permission denied message
closes #4494
2021-10-09 00:57:15 +01:00
a101d1cdf9 Drop pocketmine.plugin.fileError in favour of pocketmine.plugin.loadError
fileError was unnecessarily noisy, putting the directory path on the console twice. This conveys just as much information but with less wasted space.
2021-10-05 23:31:00 +01:00
e25c03eec1 Gracefully handle errors loading plugin manifest
this isn't perfect, but it covers the common cases.
Now, the server won't spam crashdumps just because some plugin declared nested permissions.
2021-10-05 20:28:43 +01:00
2db79cf58d Fix build 2021-10-05 18:41:47 +01:00
7d06b76aaf PluginManager: account for possible invalid format of API version
we're seeing a lot of crashes because of this.
2021-10-05 18:36:00 +01:00
fb570970a8 Localize gamemode command errors 2021-10-02 21:22:54 +01:00
30e10c38b6 Localize /help 2021-10-02 20:59:36 +01:00
05dc675d5b Replace commands.generic.notFound with a custom PM version
this also fixes #4379.
2021-10-02 20:42:59 +01:00
d63b9d1648 WorldManager: localize strings for world loading, generation and conversion 2021-10-02 20:33:32 +01:00
273aa8ab42 Drop useless usage translation strings for commands with no parameters 2021-09-11 17:06:26 +01:00
aa5a9f6d12 Enchantment: use Translatable instead of hardcoded translation keys 2021-09-03 20:52:05 +01:00
e140614a63 Localize /gc 2021-08-26 15:06:43 +01:00
47120022c2 Localize messages for /op and /deop 2021-08-26 13:31:19 +01:00
5da90b9530 Stop auto-translating strings when not asked
fixes #4371
2021-08-15 20:44:27 +01:00
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
60ac76a3bc Remove more usages of hardcoded translation keys 2021-08-15 19:22:40 +01:00
715fbc9ee5 fix last remaining non-usages of KnownTranslationFactory 2021-08-15 16:35:51 +01:00
789a669395 Rename TranslationContainer -> Translatable 2021-08-15 16:17:46 +01:00
8b9d7d6390 Support for nested TranslationContainers 2021-08-14 20:57:13 +01:00
804d02b086 TranslationContainer: added prefix(), postfix() and format() 2021-08-14 16:08:22 +01:00
fd41a0f510 Remove colors from VersionCommand
these will have to stay gone for now, until we have some way to terminate formatting codes without breaking logger output. (we need &p!! #4364)
2021-08-12 20:35:34 +01:00
f42c9bb6d6 Removed unused translation 2021-08-10 19:48:30 +01:00
2cdd6e634f New /version format 2021-08-10 19:32:28 +01:00
27a2d06083 Fix CS 2021-08-10 14:53:03 +01:00
2293bd948d Added KnownTranslationFactory and use it in as many places as possible
this makes translation usage much more statically analysable.
The only places this isn't used are:
- places that prefix translations with colours (those are still a problem)
- places where server/client translations don't match (e.g. gameMode.changed accepts different parameters in vanilla than in PM)
2021-08-10 14:50:40 +01:00
d39080c45a TranslationContainer: Add support for named translation parameters
this also fixes use cases like:

[1] = something;
[0] = match(...)

It made no sense whatsoever to discard the keys anyway.

Language::translateString() already supported named parameters since
forever anyway.
2021-08-10 14:26:54 +01:00