From cee33e223ab48036dd4d7a23b18962e5c07dc7e0 Mon Sep 17 00:00:00 2001 From: Ozh Date: Sun, 3 Feb 2013 23:17:31 +0000 Subject: [PATCH] Translation API! zomigod. First pass. See Issue 52. git-svn-id: http://yourls.googlecode.com/svn/trunk@845 12232710-3e20-11de-b438-597f59cd7555 --- admin/index.php | 8 +- admin/plugins.php | 27 +- includes/functions-html.php | 129 +++++---- includes/functions-l10n.php | 498 +++++++++++++++++++++++++++++++++ includes/load-yourls.php | 8 + includes/pomo/entry.php | 78 ++++++ includes/pomo/mo.php | 257 +++++++++++++++++ includes/pomo/po.php | 384 +++++++++++++++++++++++++ includes/pomo/streams.php | 209 ++++++++++++++ includes/pomo/translations.php | 275 ++++++++++++++++++ user/config-sample.php | 5 + user/languages/index.html | 8 + 12 files changed, 1807 insertions(+), 79 deletions(-) create mode 100644 includes/functions-l10n.php create mode 100644 includes/pomo/entry.php create mode 100644 includes/pomo/mo.php create mode 100644 includes/pomo/po.php create mode 100644 includes/pomo/streams.php create mode 100644 includes/pomo/translations.php create mode 100644 user/languages/index.html diff --git a/admin/index.php b/admin/index.php index 236fcc4..2620a9b 100644 --- a/admin/index.php +++ b/admin/index.php @@ -209,9 +209,9 @@ yourls_do_action( 'admin_page_before_content' ); if ( !$is_bookmark ) { ?>

-

Display to of URLs$total_items_clicks " . yourls_plural('click', $total_items_clicks) ?>.

+

%d to %d of %d URLs'), $display_on_page, $max_on_page, $total_items ); if( $total_items_clicks !== false ) echo ", " . yourls__('counting') . " $total_items_clicks " . yourls_plural(yourls__('click'), $total_items_clicks); ?>.

-

Overall, tracking links, clicks, and counting!

+

%d links, %d clicks, and counting!'), number_format($total_urls), number_format($total_clicks) ); ?>

@@ -220,7 +220,7 @@ Your short link', '

Quick Share

', true ); + yourls_share_box( '', '', '', '', '', '', true ); } else { echo ' -

If something goes wrong after you activate a plugin and you cannot use YOURLS or access this page, simply rename or delete its directory, or rename the plugin file to something different than plugin.php.

+

plugin.php.'); ?>

-

More plugins

+

-

For more plugins, head to the official Plugin list.

+

Plugin list.'); ?>

diff --git a/includes/functions-html.php b/includes/functions-html.php index a1f2827..b000a76 100644 --- a/includes/functions-html.php +++ b/includes/functions-html.php @@ -146,10 +146,10 @@ function yourls_html_addnew( $url = '', $keyword = '' ) {
-
Enter the URL: - Optional: Custom short URL: +
: + : : -
+
@@ -169,52 +169,52 @@ function yourls_html_tfooter( $params = array() ) {
- Search for  + -  in  + - – Order by  + –   - – Show  -  rows
+ –   +  
- Show links with + - than - clicks
+ +
- Show links created + > and />
- +   - +
@@ -223,7 +223,7 @@ function yourls_html_tfooter( $params = array() ) {