diff options
-rw-r--r-- | modules/gallery/controllers/admin_languages.php | 2 | ||||
-rw-r--r-- | modules/gallery/helpers/l10n_client.php | 13 | ||||
-rw-r--r-- | modules/gallery/views/admin_languages.html.php | 3 | ||||
-rw-r--r-- | themes/admin_wind/css/screen.css | 11 |
4 files changed, 21 insertions, 8 deletions
diff --git a/modules/gallery/controllers/admin_languages.php b/modules/gallery/controllers/admin_languages.php index 0f134fcd..2e993816 100644 --- a/modules/gallery/controllers/admin_languages.php +++ b/modules/gallery/controllers/admin_languages.php @@ -109,7 +109,7 @@ class Admin_Languages_Controller extends Admin_Controller { private function _share_translations_form() { $form = new Forge("admin/languages/share", "", "post", array("id" => "g-share-translations-form")); $group = $form->group("sharing") - ->label(t("Sharing your own translations with the Gallery community is easy. Please do!")); + ->label("Translations API Key"); $api_key = l10n_client::api_key(); $server_link = l10n_client::server_api_key_url(); $group->input("api_key") diff --git a/modules/gallery/helpers/l10n_client.php b/modules/gallery/helpers/l10n_client.php index f45f502d..52c13c78 100644 --- a/modules/gallery/helpers/l10n_client.php +++ b/modules/gallery/helpers/l10n_client.php @@ -20,13 +20,12 @@ class l10n_client_Core { - private static function _server_url() { - return "http://gallery.menalto.com/index.php"; + private static function _server_url($path) { + return "http://gallery.menalto.com/translations/$path"; } static function server_api_key_url() { - return self::_server_url() . "?q=translations/userkey/" . - self::client_token(); + return self::_server_url("userkey/" . self::client_token()); } static function client_token() { @@ -53,7 +52,7 @@ class l10n_client_Core { static function validate_api_key($api_key) { $version = "1.0"; - $url = self::_server_url() . "?q=translations/status"; + $url = self::_server_url("status"); $signature = self::_sign($version, $api_key); list ($response_data, $response_status) = remote::post( @@ -123,7 +122,7 @@ class l10n_client_Core { } $request_data = json_encode($request); - $url = self::_server_url() . "?q=translations/fetch"; + $url = self::_server_url("fetch"); list ($response_data, $response_status) = remote::post($url, array("data" => $request_data)); if (!remote::success($response_status)) { throw new Exception("@todo TRANSLATIONS_FETCH_REQUEST_FAILED " . $response_status); @@ -208,7 +207,7 @@ class l10n_client_Core { // @todo reduce memory consumption, e.g. free $request $request_data = json_encode($request); - $url = self::_server_url() . "?q=translations/submit"; + $url = self::_server_url("submit"); $signature = self::_sign($request_data); list ($response_data, $response_status) = remote::post( diff --git a/modules/gallery/views/admin_languages.html.php b/modules/gallery/views/admin_languages.html.php index d4b7b0c1..01d1ce3f 100644 --- a/modules/gallery/views/admin_languages.html.php +++ b/modules/gallery/views/admin_languages.html.php @@ -107,6 +107,9 @@ </a> <h3><?= t("Sharing your translations") ?></h3> + <p> + <?= t("Sharing your own translations with the Gallery community is easy. Please do!") ?> + </p> <?= $share_translations_form ?> </div> </div> diff --git a/themes/admin_wind/css/screen.css b/themes/admin_wind/css/screen.css index 937c4d15..2ea60402 100644 --- a/themes/admin_wind/css/screen.css +++ b/themes/admin_wind/css/screen.css @@ -419,6 +419,17 @@ th { color: #FF0000 !important; } +/* Language options ~~~~~~~~~~~~~~~~~~~~~~~~ */ +#g-share-translations-form fieldset { + border: 0px; + margin: 0px; + padding: 0px; +} + +#g-share-translations-form fieldset legend { + display: none; +} + /** ******************************************************************* * 5) Navigation and menus *********************************************************************/ |