Changeset 3834211
- Timestamp:
- 11/30/2026 05:22:53 AM (less than one hour ago)
- Location:
- dive-admin/trunk
- Files:
-
- 4 added
- 4 edited
-
dive-admin.php (modified) (2 diffs)
-
includes/class-dive-admin-i18n.php (modified) (5 diffs)
-
languages/dive-admin-pt_BR.mo (added)
-
languages/dive-admin-pt_BR.po (added)
-
languages/dive-admin-pt_PT.mo (added)
-
languages/dive-admin-pt_PT.po (added)
-
languages/dive-admin.pot (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
dive-admin/trunk/dive-admin.php
r3825358 r3834211 6 6 * Plugin URI: https://diveadmin.com/resources/wordpress 7 7 * Description: DiveAdmin.com is a software solution for diveschools. This plugin connects your website with your account. 8 * Version: 1.1. 58 * Version: 1.1.6 9 9 * Requires at least: 6.0 10 10 * Requires PHP: 7.4 … … 21 21 } 22 22 23 define( 'DIVE_ADMIN_VERSION', '1.1. 5' );23 define( 'DIVE_ADMIN_VERSION', '1.1.6' ); 24 24 if ( ! defined( 'DIVE_ADMIN_API_PATH' ) ) { 25 25 // A test site can point at another DiveAdmin by defining this in wp-config.php. -
dive-admin/trunk/includes/class-dive-admin-i18n.php
r3716883 r3834211 40 40 'fil' => 'tl', 41 41 'ar' => 'ar', 42 'pt' => 'pt_PT', 43 ); 44 45 /** 46 * Regional variants with a translation of their own, by WordPress locale (lowercased, 47 * language_REGION). Takes priority over BUNDLED and APP_CODES: pt_BR is Brazilian 48 * Portuguese, every other pt locale (pt_PT, pt_AO, pt_PT_ao90, pt) European. 49 */ 50 const REGIONAL = array( 51 'pt_br' => array( 52 'bundled' => 'pt_BR', 53 'app' => 'pt-BR', 54 ), 42 55 ); 43 56 … … 56 69 57 70 /** The languages DiveAdmin is translated into. */ 58 const APP_LANGUAGES = array( 'en', 'de', 'fr', 'es', 'nl', 'it', 'se', 'fi', 'nb', 'dk', 'ru', 'zh', 'th', 'id', 'ph', 'ar' );71 const APP_LANGUAGES = array( 'en', 'de', 'fr', 'es', 'nl', 'it', 'se', 'fi', 'nb', 'dk', 'ru', 'zh', 'th', 'id', 'ph', 'ar', 'pt', 'pt-BR' ); 59 72 60 73 /** … … 79 92 } 80 93 81 $bundled = self::BUNDLED[ self::language( $locale ) ] ?? null; 94 $regional = self::regional( $locale ); 95 $bundled = $regional ? $regional['bundled'] : ( self::BUNDLED[ self::language( $locale ) ] ?? null ); 82 96 if ( $bundled ) { 83 97 $file = self::languages_dir() . self::DOMAIN . '-' . $bundled . '.mo'; … … 90 104 /** 91 105 * The site's language as a DiveAdmin language code: "fi" for fi / fi_FI, "dk" for 92 * da_DK, "se" for sv_SE, "ph" for tl / fil . English when DiveAdmin has no translation93 * in the site's language.106 * da_DK, "se" for sv_SE, "ph" for tl / fil, "pt-BR" for pt_BR and "pt" for other 107 * Portuguese. English when DiveAdmin has no translation in the site's language. 94 108 */ 95 109 public static function app_language( $locale = null ) { 96 $language = self::language( $locale ? $locale : determine_locale() ); 110 $locale = $locale ? $locale : determine_locale(); 111 $regional = self::regional( $locale ); 112 if ( $regional ) { 113 return $regional['app']; 114 } 115 116 $language = self::language( $locale ); 97 117 $code = self::APP_CODES[ $language ] ?? $language; 98 118 … … 107 127 } 108 128 129 /** The REGIONAL entry for a locale's language and region ("pt_BR" => Brazilian), if any. */ 130 private static function regional( $locale ) { 131 $parts = explode( '_', str_replace( '-', '_', strtolower( (string) $locale ) ) ); 132 if ( ! isset( $parts[1] ) ) { 133 return null; 134 } 135 136 return self::REGIONAL[ $parts[0] . '_' . $parts[1] ] ?? null; 137 } 138 109 139 private static function languages_dir() { 110 140 return plugin_dir_path( dirname( __FILE__ ) ) . 'languages/'; -
dive-admin/trunk/languages/dive-admin.pot
r3716883 r3834211 1 1 msgid "" 2 2 msgstr "" 3 "Project-Id-Version: Dive Admin 1.1. 3\n"3 "Project-Id-Version: Dive Admin 1.1.6\n" 4 4 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/dive-admin\n" 5 5 "MIME-Version: 1.0\n" … … 75 75 msgid "Book now" 76 76 msgstr "" 77 78 #: admin/class-dive-admin-admin.php 79 msgid "Send to Dive Admin" 80 msgstr "" 81 82 #: admin/class-dive-admin-admin.php 83 msgid "Dive Admin: %1$d order(s) sent, %2$d refused." 84 msgstr "" 85 86 #: admin/class-dive-admin-admin.php 87 msgid "Dive Admin did not receive WooCommerce order #%1$s: %2$s. Copy the active WordPress API key from Dive Admin (Settings, Integrations) into the Dive Admin plugin settings, then select the missed orders and use \"Send to Dive Admin\"." 88 msgstr "" 89 90 #: admin/class-dive-admin-admin.php 91 msgid "Dive Admin settings" 92 msgstr "" 93 94 #: public/class-dive-admin-public.php 95 msgid "Sent to Dive Admin (lead #%s)." 96 msgstr "" 97 98 #: public/class-dive-admin-public.php 99 msgid "No answer from Dive Admin" 100 msgstr "" 101 102 #: public/class-dive-admin-public.php 103 msgid "Not sent to Dive Admin: %s. Check the API key in the Dive Admin plugin settings, then use \"Send to Dive Admin\" in the order actions." 104 msgstr "" -
dive-admin/trunk/readme.txt
r3825358 r3834211 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1.1. 57 Stable tag: 1.1.6 8 8 License: GPLv2 9 9 … … 41 41 == Upgrade Notice == 42 42 43 = 1.1.6 = 44 Portuguese (Portugal and Brazil) translations. 45 43 46 = 1.1.5 = 44 47 WPML/Polylang orders match products in every language; resend orders to Dive Admin; warnings when orders are refused. … … 54 57 55 58 == Changelog == 59 60 = 1.1.6 = 61 * Portuguese (Portugal and Brazil): the enquiry form, order actions, notices and order notes are translated, and Portuguese sites send Portuguese to Dive Admin booking pages and enquiries. 56 62 57 63 = 1.1.5 =
Note:
See TracChangeset
for help on using the changeset viewer.