Skip to content
This repository has been archived by the owner on May 9, 2024. It is now read-only.

Commit

Permalink
v0.3
Browse files Browse the repository at this point in the history
* Add translation template file (.POT).
* Add translate help text.
* Tested with WordPress 5.0 but keep old editor for some reason.
  • Loading branch information
ve3 committed Dec 8, 2018
1 parent 8c64fea commit 77e21fb
Show file tree
Hide file tree
Showing 11 changed files with 487 additions and 154 deletions.
3 changes: 3 additions & 0 deletions .dev-notes/how-to-create-pot.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Use this command:
`wp i18n make-pot . App/languages/rd-events.pot --exclude="assets,languages,*.css,*.js,*.svg,*.eot,*.woff,*.woff2,*.ttf,*.html,*.txt,*.pot"`
And check the result.
6 changes: 6 additions & 0 deletions .dev-notes/requirement.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PHP 5.5+
- Output Buffer "On" or "Limited" but not "Off"

WordPress 4.0

Cross browser: Firefox, Chrome, Opera, Internet Explorer 10+, MS Edge.
6 changes: 5 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Disable LF normalization for all files
* -text
* -text

# Export ignore folders, files.
.dev-notes export-ignore
.gitattributes export-ignore
6 changes: 4 additions & 2 deletions App/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,14 @@ private function checkRequirement()
$php_version = (defined('PHP_VERSION') ? PHP_VERSION : (function_exists('phpversion') ? phpversion() : '4'));

if (version_compare(get_bloginfo('version'), $wordpress_required_version, '<')) {
$error_message = sprintf(__('Your WordPress version does not meet the requirement. (%s < %s).', 'rd-events'), get_bloginfo('version'), $wordpress_required_version);
/* translators: %1$s: Current WordPress version, %2$s: Required WordPress version. */
$error_message = sprintf(__('Your WordPress version does not meet the requirement. (%1$s < %2$s).', 'rd-events'), get_bloginfo('version'), $wordpress_required_version);
throw new \Exception($error_message);
}

if (version_compare($php_version, $php_required_version, '<')) {
$error_message = sprintf(__('Your PHP version does not meet the requirement. (%s < %s).', 'rd-events'), $php_version, $php_required_version);
/* translators: %1$s: Current PHP version, %2$s: Required PHP version. */
$error_message = sprintf(__('Your PHP version does not meet the requirement. (%1$s < %2$s).', 'rd-events'), $php_version, $php_required_version);
throw new \Exception($error_message);
}

Expand Down
6 changes: 6 additions & 0 deletions App/Controllers/Admin/Events/EventsPostType.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ public function registerPostType()
'exclude_from_search' => false,
'show_in_menu' => true,
'show_in_admin_bar' => false,

// make new editor support in WordPress 5 (Gutenberg).
//'show_in_rest' => true,
// Skip this for now and wait until WordPress completely drop TinyMCE because old editor is a lot easier to understand.
// required WP 4.7.

'menu_position' => 26,
'menu_icon' => 'dashicons-calendar-alt',
'supports' => ['title', 'editor', 'comments', 'author', 'thumbnail'],
Expand Down
4 changes: 3 additions & 1 deletion App/Views/Admin/Settings/settingsPageAction_v.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
<p class="description">
<?php
echo sprintf(
__('Go to %s and enable %s.', 'rd-events'),
/* translators: %1$s: Link to Google APIs manager, %2$s: Highlight Google Maps JS API text. */
__('Go to %1$s and enable %2$s.', 'rd-events'),
'<a href="https://console.developers.google.com/apis/library" target="googleapis">' . __('Google APIs Manager', 'rd-events') . '</a>',
'<strong>' . __('Google Maps JavaScript API ', 'rd-events') . '</strong>'
) . '<br>';
echo sprintf(
/* translators: %s: Credentials text. */
__('Go to %s and create API key and then copy the key to this input.', 'rd-events'),
'<strong>' . __('Credentials', 'rd-events') . '</strong>'
);
Expand Down
Binary file modified App/languages/rd-events-th.mo
Binary file not shown.
Loading

0 comments on commit 77e21fb

Please sign in to comment.