Skip to content

Commit

Permalink
v1.2.0 for MCDR 2.1+ translation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Fallen-Breath committed Aug 26, 2021
1 parent 4793bb5 commit d17449b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion mcdreforged.plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "simple_op",
"version": "1.1.0",
"version": "1.2.0",
"name": "Simple OP",
"description": {
"en_us": "!!op to get op, !!restart to restart the server",
Expand All @@ -9,6 +9,9 @@
"author": [
"Fallen_Breath"
],
"dependencies": {
"mcdreforged": ">=2.1.0-beta"
},
"link": "https://github.com/MCDReforged/SimpleOP",
"resources": [
"lang"
Expand Down
4 changes: 2 additions & 2 deletions simple_op/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ class Config(Serializable):
config = Config.get_default()


def tr(translation_key: str, *args, **kwargs):
return ServerInterface.get_instance().tr('{}.{}'.format(PLUGIN_METADATA.id, translation_key), *args, **kwargs)
def tr(translation_key: str, *args, **kwargs) -> RTextMCDRTranslation:
return ServerInterface.get_instance().rtr('{}.{}'.format(PLUGIN_METADATA.id, translation_key), *args, **kwargs)


@new_thread(PLUGIN_METADATA.name + ' - restart')
Expand Down

0 comments on commit d17449b

Please sign in to comment.