Skip to content

Commit

Permalink
API help messages are now internationalized for #47
Browse files Browse the repository at this point in the history
  • Loading branch information
elifoster committed Oct 13, 2017
1 parent ce88ee0 commit 69e7008
Show file tree
Hide file tree
Showing 12 changed files with 45 additions and 141 deletions.
13 changes: 0 additions & 13 deletions api/TilesheetsAddSheetApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,19 +37,6 @@ public function isWriteMode() {
return true;
}

public function getParamDescription() {
return array(
'token' => 'The edit token',
'summary' => 'An optional edit summary',
'mod' => 'The mod abbreviation',
'sizes' => 'Pipe separated list of tile sizes',
);
}

public function getDescription() {
return 'Creates a new tilesheet with the given mod abbreviation and sizes';
}

public function getExamples() {
return array(
'api.php?action=createsheet&tssummary=This mod rocks&tsmod=MOD&tssizes=16|32|64',
Expand Down
13 changes: 0 additions & 13 deletions api/TilesheetsAddTilesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,6 @@ public function isWriteMode() {
return true;
}

public function getParamDescription() {
return array(
'token' => 'The edit token',
'summary' => 'An optional edit summary',
'mod' => 'The mod abbreviation',
'import' => 'A pipe separated list of entries. Format each entry as `X Y Item Name`.',
);
}

public function getDescription() {
return 'Adds a single tile to a given tilesheet';
}

public function getExamples() {
return array(
'api.php?action=addtiles&tssummary=Adding many tiles&tsmod=V&tsimport=0 0 Item|0 1 Other Item'
Expand Down
12 changes: 0 additions & 12 deletions api/TilesheetsDeleteSheetApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,6 @@ public function isWriteMode() {
return true;
}

public function getParamDescription() {
return array(
'token' => 'The edit token',
'summary' => 'An optional edit summary',
'mods' => 'The mod abbreviations to delete',
);
}

public function getDescription() {
return 'Deletes tilesheets by the mod abbreviations specified';
}

public function getExamples() {
return array(
'api.php?action=deletesheet&tsmods=A|B|C&tssummary=Because I don\'t know my ABCs.',
Expand Down
12 changes: 0 additions & 12 deletions api/TilesheetsDeleteTilesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,6 @@ public function isWriteMode() {
return true;
}

public function getParamDescription() {
return array(
'token' => 'The edit token',
'summary' => 'An optional edit summary',
'ids' => 'A list of entry IDs to delete',
);
}

public function getDescription() {
return 'Deletes individual tile entries from the database';
}

public function getExamples() {
return array(
'api.php?action=deletetiles&tsids=1|2|3',
Expand Down
12 changes: 0 additions & 12 deletions api/TilesheetsDeleteTranslationApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,6 @@ public function isWriteMode() {
return true;
}

public function getParamDescription() {
return array(
'token' => 'The edit token',
'id' => 'The entry ID to delete',
'lang' => 'The language of the entry to delete'
);
}

public function getDescription() {
return 'Deletes a translation for an entry ID.';
}

public function getExamples() {
return array(
'api.php?action=deletetranslation&tsid=6&tslang=es',
Expand Down
14 changes: 0 additions & 14 deletions api/TilesheetsEditSheetApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,20 +39,6 @@ public function isWriteMode() {
return true;
}

public function getParamDescription() {
return array(
'token' => 'The edit token',
'summary' => 'An optional edit summary',
'mod' => 'The current mod abbreviation',
'tomod' => 'The new mod abbreviation',
'tosizes' => 'A pipe separated list of new sizes',
);
}

public function getDescription() {
return 'Edits a sheet\'s data';
}

public function getExamples() {
return array(
'api.php?action=editsheet&mod=A&tomod=B&tosizes=32|64',
Expand Down
16 changes: 0 additions & 16 deletions api/TilesheetsEditTileApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,22 +44,6 @@ public function isWriteMode() {
return true;
}

public function getParamDescription() {
return array(
'token' => 'The edit token',
'summary' => 'An optional edit summary',
'id' => 'The entry ID for the tile',
'tomod' => 'The new mod abbreviation',
'toname' => 'The new item name',
'tox' => 'The new X coordinate',
'toy' => 'The new Y coordinate',
);
}

public function getDescription() {
return 'Edits a tile entry\'s data';
}

public function getExamples() {
return array(
'api.php?action=edittile&id=1&tomod=V&toname=Log&tox=1&toy=1',
Expand Down
11 changes: 0 additions & 11 deletions api/TilesheetsQuerySheetsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,6 @@ public function getAllowedParams() {
);
}

public function getParamDescription() {
return array(
'limit' => 'The maximum number of sheets to list',
'from' => 'The abbreviation to start listing at'
);
}

public function getDescription() {
return 'Get all of the sheets.';
}

public function getExamples() {
return array(
'api.php?action=query&list=tilesheets&tslimit=50',
Expand Down
12 changes: 0 additions & 12 deletions api/TilesheetsQueryTilesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,18 +25,6 @@ public function getAllowedParams() {
);
}

public function getParamDescription() {
return array(
'limit' => 'The maximum number of tiles to list',
'from' => 'The tile ID to start listing at',
'mod' => 'The mod to filter by',
);
}

public function getDescription() {
return 'Get all of the tiles filtered by mod.';
}

public function getExamples() {
return array(
'api.php?action=query&list=tiles&tslimit=50&tsmod=W',
Expand Down
11 changes: 0 additions & 11 deletions api/TilesheetsQueryTranslationsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,6 @@ public function getAllowedParams() {
);
}

public function getParamDescription() {
return array(
'id' => 'The entry ID to get translations for',
'lang' => 'The language to get translations for',
);
}

public function getDescription() {
return 'Get all of the translations for the given entry ID and/or language.';
}

public function getExamples() {
return array(
'api.php?action=query&list=tiletranslations&tsid=6',
Expand Down
14 changes: 0 additions & 14 deletions api/TilesheetsTranslateTileApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,6 @@ public function isWriteMode() {
return true;
}

public function getParamDescription() {
return array(
'token' => 'The edit token',
'id' => 'The tile entry ID',
'lang' => 'The language code to translate to',
'name' => 'The localized name',
'description' => 'The localized description',
);
}

public function getDescription() {
return 'Translates the given tile data, either updating or creating a new entry.';
}

public function getExamples() {
return array(
'api.php?action=translatetile&tsid=6&tslang=es-ni&tsname=Esmeralda',
Expand Down
46 changes: 45 additions & 1 deletion i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,49 @@
"tilesheet-missing-item-category": "Pages with a missing tile name",
"tilesheet-no-mod-provided-category": "Pages with a missing mod parameter",
"tilesheet-no-mod-provided-easy-category": "Pages with an easily fixable missing mod parameter",
"grant-tilesheets": "Edit, import, or translate tilesheets"
"grant-tilesheets": "Edit, import, or translate tilesheets",
"apihelp-addtiles-description": "Adds a single tile to a given tilesheet.",
"apihelp-addtiles-param-summary": "An optional edit summary.",
"apihelp-addtiles-param-mod": "The mod abbreviation.",
"apihelp-addtiles-param-import": "A pipe separated list of entries. Format each entry as `X Y Item Name`.",
"apihelp-deletesheet-description": "Deletes tilesheets by the mod abbreviations specified.",
"apihelp-deletesheet-param-summary": "An optional edit summary.",
"apihelp-deletesheet-param-mods": "The mod abbreviations to delete.",
"apihelp-createsheet-description": "Creates a new tilesheet with the given mod abbreviation and sizes.",
"apihelp-createsheet-param-summary": "An optional edit summary.",
"apihelp-createsheet-param-mod": "The mod abbreviation.",
"apihelp-createsheet-param-sizes": "Pipe separated list of tile sizes.",
"apihelp-deletetiles-description": "Deletes individual tile entries from the database.",
"apihelp-deletetiles-param-summary": "An optional edit summary.",
"apihelp-deletetiles-param-ids": "A list of entry IDs to delete.",
"apihelp-edittile-description": "Edits a tile entry's data.",
"apihelp-edittile-param-summary": "An optional edit summary.",
"apihelp-edittile-param-id": "The entry ID for the tile.",
"apihelp-edittile-param-tomod": "The new mod abbreviation.",
"apihelp-edittile-param-toname": "The new item name.",
"apihelp-edittile-param-tox": "The new X coordinate.",
"apihelp-edittile-param-toy": "The new Y coordinate.",
"apihelp-editsheet-description": "Edits a sheet's data.",
"apihelp-editsheet-param-summary": "An optional edit summary.",
"apihelp-editsheet-param-mod": "The current mod abbreviation.",
"apihelp-editsheet-param-tomod": "The new mod abbreviation.",
"apihelp-editsheet-param-tosizes": "A pipe separated list of new sizes.",
"apihelp-deletetranslation-description": "Deletes a translation for an entry ID.",
"apihelp-deletetranslation-param-id": "The entry ID to delete from.",
"apihelp-deletetranslation-param-lang": "The language of the entry to delete.",
"apihelp-translatetile-description": "Translates the given tile data, either updating or creating a new entry.",
"apihelp-translatetile-param-id": "The tile entry ID.",
"apihelp-translatetile-param-lang": "The language code to translate to.",
"apihelp-translatetile-param-name": "The localized name.",
"apihelp-translatetile-param-description": "The localized description.",
"apihelp-query+tilesheets-description": "Get all of the sheets.",
"apihelp-query+tilesheets-param-limit": "The maximum number of sheets to list.",
"apihelp-query+tilesheets-param-from": "The abbreviation to start listing at.",
"apihelp-query+tiles-description": "Get all of the tiles filtered by mod.",
"apihelp-query+tiles-param-limit": "The maximum number of tiles to list.",
"apihelp-query+tiles-param-from": "The tile ID to start listing at.",
"apihelp-query+tiles-param-mod": "The mod to filter by.",
"apihelp-query+tiletranslations-description": "Get all of the translations for the given entry ID and/or language.",
"apihelp-query+tiletranslations-param-id": "The entry ID to get translations for.",
"apihelp-query+tiletranslations-param-lang": "The language to get translations for."
}

0 comments on commit 69e7008

Please sign in to comment.