Changeset 3263606
- Timestamp:
- 03/28/2025 06:43:44 PM (12 months ago)
- Location:
- nepali-date-converter
- Files:
-
- 34 added
- 6 edited
-
tags/3.0.1 (added)
-
tags/3.0.1/inc (added)
-
tags/3.0.1/inc/class (added)
-
tags/3.0.1/inc/class/index.php (added)
-
tags/3.0.1/inc/class/ndc-frontend.php (added)
-
tags/3.0.1/inc/class/ndc-post-date.php (added)
-
tags/3.0.1/inc/frameworks (added)
-
tags/3.0.1/inc/frameworks/nepali-calendar (added)
-
tags/3.0.1/inc/frameworks/nepali-calendar/index.php (added)
-
tags/3.0.1/inc/frameworks/nepali-calendar/nepali-calendar.php (added)
-
tags/3.0.1/inc/functions (added)
-
tags/3.0.1/inc/functions/functions.php (added)
-
tags/3.0.1/inc/functions/index.php (added)
-
tags/3.0.1/inc/hooks (added)
-
tags/3.0.1/inc/hooks/enqueue-scripts.php (added)
-
tags/3.0.1/inc/hooks/index.php (added)
-
tags/3.0.1/inc/hooks/wp-ajax.php (added)
-
tags/3.0.1/inc/hooks/wp-footer.php (added)
-
tags/3.0.1/inc/index.php (added)
-
tags/3.0.1/inc/init.php (added)
-
tags/3.0.1/inc/shortcode (added)
-
tags/3.0.1/inc/shortcode/index.php (added)
-
tags/3.0.1/inc/shortcode/shortcode-nepali-date-converter.php (added)
-
tags/3.0.1/inc/shortcode/shortcode-today-date.php (added)
-
tags/3.0.1/inc/widgets (added)
-
tags/3.0.1/inc/widgets/index.php (added)
-
tags/3.0.1/inc/widgets/widget-nepali-date-converter.php (added)
-
tags/3.0.1/inc/widgets/widget-today-date.php (added)
-
tags/3.0.1/index.php (added)
-
tags/3.0.1/languages (added)
-
tags/3.0.1/languages/index.php (added)
-
tags/3.0.1/languages/nepali-date-converter.pot (added)
-
tags/3.0.1/nepali-date-converter.php (added)
-
tags/3.0.1/readme.txt (added)
-
trunk/inc/class/ndc-post-date.php (modified) (1 diff)
-
trunk/inc/frameworks/nepali-calendar/nepali-calendar.php (modified) (4 diffs)
-
trunk/inc/functions/functions.php (modified) (2 diffs)
-
trunk/languages/nepali-date-converter.pot (modified) (4 diffs)
-
trunk/nepali-date-converter.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nepali-date-converter/trunk/inc/class/ndc-post-date.php
r3263598 r3263606 256 256 */ 257 257 public function render_date_format_field(): void { 258 $date_formats = array_unique( apply_filters( 'ndc_date_formats', array( __( 'F j, Y' ), 'Y-m-d', 'm/d/Y', 'd/m/Y' ) ) ); 258 $date_formats = array_unique( apply_filters( 'ndc_date_formats', array( 'F j, Y', 'Y-m-d', 'm/d/Y', 'd/m/Y' ) ) ); 259 259 260 $front_date_converter = ndc_frontend(); 260 261 ?> -
nepali-date-converter/trunk/inc/frameworks/nepali-calendar/nepali-calendar.php
r3263598 r3263606 460 460 return sprintf( 461 461 // translators: %1$d represents the first year, %2$d represents the last year in the supported Nepali wp_date range. 462 __( 'Supported only between %1$d-%2$d', 'nepali- wp_date-converter' ),462 __( 'Supported only between %1$d-%2$d', 'nepali-date-converter' ), 463 463 $english_range['first'], 464 464 $english_range['last'] … … 467 467 468 468 if ( $month < 1 || $month > 12 ) { 469 return __( 'Error! month value can be between 1-12 only', 'nepali- wp_date-converter' );469 return __( 'Error! month value can be between 1-12 only', 'nepali-date-converter' ); 470 470 } 471 471 472 472 if ( $day < 1 || $day > 31 ) { 473 return __( 'Error! day value can be between 1-31 only', 'nepali- wp_date-converter' );473 return __( 'Error! day value can be between 1-31 only', 'nepali-date-converter' ); 474 474 } 475 475 … … 492 492 return sprintf( 493 493 // translators: %1$d represents the first year, %2$d represents the last year in the supported Nepali wp_date range. 494 __( 'Supported only between %1$d-%2$d', 'nepali- wp_date-converter' ),494 __( 'Supported only between %1$d-%2$d', 'nepali-date-converter' ), 495 495 $nepali_range['first'], 496 496 $nepali_range['last'] … … 499 499 500 500 if ( $month < 1 || $month > 12 ) { 501 return __( 'Error! month value can be between 1-12 only', 'nepali- wp_date-converter' );501 return __( 'Error! month value can be between 1-12 only', 'nepali-date-converter' ); 502 502 } 503 503 504 504 if ( $day < 1 || $day > 32 ) { 505 return __( 'Error! day value can be between 1-32 only', 'nepali- wp_date-converter' );505 return __( 'Error! day value can be between 1-32 only', 'nepali-date-converter' ); 506 506 } 507 507 -
nepali-date-converter/trunk/inc/functions/functions.php
r3263598 r3263606 139 139 switch ( true ) { 140 140 case $diff < MINUTE_IN_SECONDS: 141 $secs = max( $diff, 1 ); 142 143 /* translators: Time difference between two dates, in seconds. %s: Number of seconds. */ 144 $since = sprintf( _n( '%s सेकेन्ड', '%s सेकेन्ड', $secs ), $secs ); 141 $secs = max( $diff, 1 ); 142 $since = sprintf( '%s सेकेन्ड', $secs ); 145 143 break; 146 144 case $diff < HOUR_IN_SECONDS: 147 $mins = max( round( $diff / MINUTE_IN_SECONDS ), 1 ); 148 149 /* translators: Time difference between two dates, in minutes (min=minute). %s: Number of minutes. */ 150 $since = sprintf( _n( '%s मिनेट', '%s मिनेट', $mins ), $mins ); 145 $mins = max( round( $diff / MINUTE_IN_SECONDS ), 1 ); 146 $since = sprintf( '%s मिनेट', $mins ); 151 147 break; 152 148 case $diff < DAY_IN_SECONDS: 153 149 $hours = max( round( $diff / HOUR_IN_SECONDS ), 1 ); 154 155 /* translators: Time difference between two dates, in hours. %s: Number of hours. */ 156 $since = sprintf( _n( '%s घण्टा', '%s घण्टा', $hours ), $hours ); 150 $since = sprintf( '%s घण्टा', $hours ); 157 151 break; 158 152 case $diff < WEEK_IN_SECONDS: 159 $days = max( round( $diff / DAY_IN_SECONDS ), 1 ); 160 161 /* translators: Time difference between two dates, in days. %s: Number of days. */ 162 $since = sprintf( _n( '%s दिन', '%s दिन', $days ), $days ); 153 $days = max( round( $diff / DAY_IN_SECONDS ), 1 ); 154 $since = sprintf( '%s दिन', $days ); 163 155 break; 164 156 case $diff < MONTH_IN_SECONDS: 165 157 $weeks = max( round( $diff / WEEK_IN_SECONDS ), 1 ); 166 167 /* translators: Time difference between two dates, in weeks. %s: Number of weeks. */ 168 $since = sprintf( _n( '%s हप्ता', '%s हप्ता', $weeks ), $weeks ); 158 $since = sprintf( '%s हप्ता', $weeks ); 169 159 break; 170 160 case $diff < YEAR_IN_SECONDS: 171 161 $months = max( round( $diff / MONTH_IN_SECONDS ), 1 ); 172 173 /* translators: Time difference between two dates, in months. %s: Number of months. */ 174 $since = sprintf( _n( '%s महिना', '%s महिना', $months ), $months ); 162 $since = sprintf( '%s महिना', $months ); 175 163 break; 176 164 default: 177 165 $years = max( round( $diff / YEAR_IN_SECONDS ), 1 ); 178 179 /* translators: Time difference between two dates, in years. %s: Number of years. */ 180 $since = sprintf( _n( '%s वर्ष', '%s वर्ष', $years ), $years ); 181 } 182 183 /*Convert num to Nepali*/ 166 $since = sprintf( '%s वर्ष', $years ); 167 } 168 169 /* 170 * Note: We are not using _n() here because in Nepali language, 171 * the singular and plural forms of these time units (सेकेन्ड, मिनेट, etc.) 172 * are the same. Therefore, pluralization is not necessary. 173 */ 174 175 /* Convert numbers to Nepali */ 184 176 $since = strtr( $since, ndc_nepali_calendar()->eng_nep_num ); 185 177 … … 196 188 return apply_filters( 'ndc_human_time_diff', $since, $diff, $from, $to ); 197 189 } 190 198 191 } 199 192 -
nepali-date-converter/trunk/languages/nepali-date-converter.pot
r3263598 r3263606 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: Nepali Date Converter 3.0. 0\n"5 "Project-Id-Version: Nepali Date Converter 3.0.1\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/nepali-date-converter\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2025-03-28T1 7:37:04+00:00\n"12 "POT-Creation-Date: 2025-03-28T18:35:27+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.6.0\n" … … 59 59 60 60 #: inc/class/ndc-post-date.php:142 61 #: inc/class/ndc-post-date.php:26 361 #: inc/class/ndc-post-date.php:264 62 62 msgid "Date Format" 63 63 msgstr "" 64 64 65 65 #: inc/class/ndc-post-date.php:150 66 #: inc/class/ndc-post-date.php:31 167 #: inc/class/ndc-post-date.php:31 466 #: inc/class/ndc-post-date.php:312 67 #: inc/class/ndc-post-date.php:315 68 68 msgid "Force Format" 69 69 msgstr "" … … 128 128 msgstr "" 129 129 130 #: inc/class/ndc-post-date.php:28 5130 #: inc/class/ndc-post-date.php:286 131 131 msgid "Custom:" 132 132 msgstr "" 133 133 134 #: inc/class/ndc-post-date.php:28 6134 #: inc/class/ndc-post-date.php:287 135 135 msgid "enter a custom date format in the following field" 136 136 msgstr "" 137 137 138 #: inc/class/ndc-post-date.php:29 0138 #: inc/class/ndc-post-date.php:291 139 139 msgid "Custom date format:" 140 140 msgstr "" 141 141 142 #: inc/class/ndc-post-date.php:29 4143 #: inc/class/ndc-post-date.php:37 2142 #: inc/class/ndc-post-date.php:295 143 #: inc/class/ndc-post-date.php:373 144 144 msgid "Preview:" 145 145 msgstr "" 146 146 147 #: inc/class/ndc-post-date.php:31 5147 #: inc/class/ndc-post-date.php:316 148 148 msgid "When enabled, hard coded formats will be ignored. Example:" 149 149 msgstr "" 150 150 151 #: inc/class/ndc-post-date.php:33 1152 #: inc/class/ndc-post-date.php:33 4151 #: inc/class/ndc-post-date.php:332 152 #: inc/class/ndc-post-date.php:335 153 153 msgid "Front Page" 154 154 msgstr "" 155 155 156 #: inc/class/ndc-post-date.php:3 39156 #: inc/class/ndc-post-date.php:340 157 157 msgid "Home - Blog Home" 158 158 msgstr "" 159 159 160 #: inc/class/ndc-post-date.php:34 2160 #: inc/class/ndc-post-date.php:343 161 161 msgid "Home (Blog Home)" 162 162 msgstr "" 163 163 164 #: inc/class/ndc-post-date.php:34 7165 #: inc/class/ndc-post-date.php:35 0164 #: inc/class/ndc-post-date.php:348 165 #: inc/class/ndc-post-date.php:351 166 166 msgid "Archive" 167 167 msgstr "" 168 168 169 #: inc/class/ndc-post-date.php:35 5170 #: inc/class/ndc-post-date.php:35 8169 #: inc/class/ndc-post-date.php:356 170 #: inc/class/ndc-post-date.php:359 171 171 msgid "Single" 172 172 msgstr "" 173 173 174 #: inc/class/ndc-post-date.php:36 3175 #: inc/class/ndc-post-date.php:36 5174 #: inc/class/ndc-post-date.php:364 175 #: inc/class/ndc-post-date.php:366 176 176 msgid "Suffix" 177 177 msgstr "" 178 178 179 #: inc/class/ndc-post-date.php:36 8179 #: inc/class/ndc-post-date.php:369 180 180 msgid "Example" 181 181 msgstr "" 182 182 183 #: inc/class/ndc-post-date.php:3 89183 #: inc/class/ndc-post-date.php:390 184 184 msgid "No post types found!" 185 185 msgstr "" 186 186 187 #: inc/class/ndc-post-date.php:4 19187 #: inc/class/ndc-post-date.php:420 188 188 msgid "Security check failed" 189 189 msgstr "" 190 190 191 #: inc/class/ndc-post-date.php:54 8191 #: inc/class/ndc-post-date.php:549 192 192 msgid "Error generating date preview" 193 193 msgstr "" 194 194 195 #: inc/class/ndc-post-date.php:56 2195 #: inc/class/ndc-post-date.php:563 196 196 msgid "Date format not provided" 197 197 msgstr "" 198 198 199 #: inc/class/ndc-post-date.php:57 0199 #: inc/class/ndc-post-date.php:571 200 200 msgid "Invalid date format" 201 msgstr "" 202 203 #. translators: %1$d represents the first year, %2$d represents the last year in the supported Nepali wp_date range. 204 #: inc/frameworks/nepali-calendar/nepali-calendar.php:462 205 #: inc/frameworks/nepali-calendar/nepali-calendar.php:494 206 msgid "Supported only between %1$d-%2$d" 207 msgstr "" 208 209 #: inc/frameworks/nepali-calendar/nepali-calendar.php:469 210 #: inc/frameworks/nepali-calendar/nepali-calendar.php:501 211 msgid "Error! month value can be between 1-12 only" 212 msgstr "" 213 214 #: inc/frameworks/nepali-calendar/nepali-calendar.php:473 215 msgid "Error! day value can be between 1-31 only" 216 msgstr "" 217 218 #: inc/frameworks/nepali-calendar/nepali-calendar.php:505 219 msgid "Error! day value can be between 1-32 only" 201 220 msgstr "" 202 221 -
nepali-date-converter/trunk/nepali-date-converter.php
r3263598 r3263606 4 4 Plugin URI: https://www.addonspress.com/wordpress-plugins/nepali-date-converter/ 5 5 Description: Convert English to Nepali Date and Vice Versa and Post Date to Nepali Date. 6 Version: 3.0. 06 Version: 3.0.1 7 7 Author: addonspress 8 8 Author URI: https://www.addonspress.com/ … … 17 17 } 18 18 /*Define Constants for this plugin*/ 19 define( 'NEPALI_DATE_CONVERTER_VERSION', '3.0. 0' );19 define( 'NEPALI_DATE_CONVERTER_VERSION', '3.0.1' ); 20 20 define( 'NEPALI_DATE_CONVERTER_PATH', plugin_dir_path( __FILE__ ) ); 21 21 define( 'NEPALI_DATE_CONVERTER_URL', plugin_dir_url( __FILE__ ) ); -
nepali-date-converter/trunk/readme.txt
r3263601 r3263606 1 1 === Nepali Date Converter === 2 Contributors: addonspress, acmeit, codersantosh 3 Donate link: https://www.addonspress.com/ 4 Tags: Nepali post date, Nepali date converter, today Nepali date, English to Nepali date converter, Nepali to English date converter 5 Requires at least: 4.9 6 Tested up to: 6.7 7 Requires PHP: 7.2 8 Stable tag: 3.0. 09 License: GPLv2 or later 2 Contributors: addonspress, acmeit, codersantosh 3 Donate link: https://www.addonspress.com/ 4 Tags: Nepali post date, Nepali date converter, today Nepali date, English to Nepali date converter, Nepali to English date converter 5 Requires at least: 4.9 6 Tested up to: 6.7 7 Requires PHP: 7.2 8 Stable tag: 3.0.1 9 License: GPLv2 or later 10 10 License URI: http://www.gnu.org/licenses/gpl-2.0.html 11 11 … … 13 13 14 14 == Description == 15 16 15 Nepali Date Converter makes converting dates between English (Gregorian) and Nepali (Bikram Sambat) formats easy. Whether you're building a Nepali-language WordPress site or just need to display today’s Nepali date, this plugin has you covered. 17 16 … … 123 122 == Changelog == 124 123 124 = 3.0.1 - 2025-03-29 = 125 * Fixed: Few translation issue 126 125 127 = 3.0.0 - 2025-03-28 = 126 128 * Rewrite: Complete plugin rewrite with modern codebase
Note: See TracChangeset
for help on using the changeset viewer.