From d89a59349b22ab56e475be31d4cb5c37e0f5f228 Mon Sep 17 00:00:00 2001 From: Alex Lion Date: Thu, 16 Jan 2025 18:36:48 -0800 Subject: [PATCH] Improve I18N Issues based on 1.5.5 --- src/class-jetpack-importer.php | 46 ++++++++++++++------------ src/class-widget-most-viewed-posts.php | 10 +++--- src/views/dashboard-page.php | 24 +++++++------- src/views/dashboard-widget.php | 12 +++---- src/views/nav.php | 8 ++--- src/views/settings-page.php | 32 +++++++++--------- 6 files changed, 68 insertions(+), 64 deletions(-) diff --git a/src/class-jetpack-importer.php b/src/class-jetpack-importer.php index 36e036d..37db319 100644 --- a/src/class-jetpack-importer.php +++ b/src/class-jetpack-importer.php @@ -21,66 +21,66 @@ public function show_page(): void
-

Sorry, something went wrong in trying to retrieve your stats from WordPress.com. Please check whether your API key and blog URL are correct.

+

-

Big success! Your stats are now imported into Koko Analytics.

+

-

Import analytics from JetPack Stats

-

To import your historical analytics data from JetPack Stats into Koko Analytics, provide your WordPress.com API key and blog URL in the field below.

+

+

-
+ - + - + - + - +
-

You can find your WordPress.com API key here.

+

',''); ?>

-

The full URL to the root directory of your blog. Including the full path.

+

-

The earliest date for which to import data. You should probably set this to the date that you installed and activated Jetpack Stats.

+

-

The last date for which to import data. You should probably set this to just before the date that you installed and activated Koko Analytics.

+

- +

-

Things to know before running the import

-

Importing data for a given date range will add to any existing data. The import process can not be reverted unless you reinstate a back-up of your database in its current state.

-

It's also important to know that JetPack doesn't provide data for the distinct number of visitors, so the data imported will only import the total number of pageviews for each post and therefore differ slightly from data collected by Koko Analytics itself.

+

+

+

-

Liberating your data... Please wait.

-

Importing stats between format('Y-m-d'); ?> and format('Y-m-d'); ?>.

-

Please do not close this browser tab while the importer is running.

-

Estimated time left: seconds.

+

+

' . $chunk_start->format('Y-m-d') . '', + '' . $chunk_end->format('Y-m-d') . '' + );?>

+

+

true ], 'objects'); ?>

- +

- +

- +

id="get_field_id('show_date'); ?>" name="get_field_name('show_date'); ?>" /> - +

- +  — 
- +
@@ -103,7 +103,7 @@ $change = $totals_previous->visitors == 0 ? 0 : ($totals->visitors / $totals_previous->visitors) - 1; ?> - + visitors); ?> @@ -130,7 +130,7 @@ $change = $totals_previous->pageviews == 0 ? 0 : ($totals->pageviews / $totals_previous->pageviews) - 1; ?> - + pageviews); ?> @@ -152,10 +152,10 @@ - + - + @@ -203,10 +203,10 @@ = $posts_limit || $posts_offset + $posts_limit < $posts_count) { ?>
= $posts_limit) { ?> - + - +
@@ -244,10 +244,10 @@ = $referrers_limit || $referrers_offset + $referrers_limit < $referrers_count) { ?>
= $referrers_limit) { ?> - + - +
diff --git a/src/views/dashboard-widget.php b/src/views/dashboard-widget.php index 3d8c11f..e046df0 100644 --- a/src/views/dashboard-widget.php +++ b/src/views/dashboard-widget.php @@ -18,15 +18,15 @@
-

+

- ' . number_format_i18n($totals->pageviews) . '', '' . number_format_i18n($realtime) . ''); ?> + ' . number_format_i18n($totals->pageviews) . '', '' . number_format_i18n($realtime) . ''); ?>

- +

@@ -37,7 +37,7 @@ 0) { ?>

- +

    @@ -51,7 +51,7 @@ 0) { ?>

    - +

      @@ -68,6 +68,6 @@

      - +

      diff --git a/src/views/nav.php b/src/views/nav.php index efb1c97..23bcf88 100644 --- a/src/views/nav.php +++ b/src/views/nav.php @@ -9,21 +9,21 @@
    • - +
    • - +
    • - +
    • - +
    • diff --git a/src/views/settings-page.php b/src/views/settings-page.php index 4e6444a..edd973f 100644 --- a/src/views/settings-page.php +++ b/src/views/settings-page.php @@ -18,11 +18,11 @@
      -

      +

      -

      +

      @@ -132,7 +132,7 @@ -

      ' . $endpoint_installer->get_file_name() . ''); ?>

      +

      ' . $endpoint_installer->get_file_name() . ''); ?>

      @@ -145,7 +145,7 @@ 300 ? 'style="color: red;"' : ''; ?>> - +

      @@ -204,17 +204,17 @@
      -

      Upgrade to Koko Analytics Pro

      -

      You are currently using the free version of Koko Analytics. There is a paid add-on called Koko Analytics Pro which adds several powerful features:

      +

      +

      ',''); ?>

      -

      View pricing

      -

      By purchasing Koko Analytics Pro you get immediate access to these features while simultaneously supporting further development and maintenance of this free plugin.

      +

      +

      @@ -227,9 +227,9 @@