Plugin Directory

Changeset 3263606


Ignore:
Timestamp:
03/28/2025 06:43:44 PM (12 months ago)
Author:
addonspress
Message:

3.0.1

Location:
nepali-date-converter
Files:
34 added
6 edited

Legend:

Unmodified
Added
Removed
  • nepali-date-converter/trunk/inc/class/ndc-post-date.php

    r3263598 r3263606  
    256256         */
    257257        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
    259260            $front_date_converter = ndc_frontend();
    260261            ?>
  • nepali-date-converter/trunk/inc/frameworks/nepali-calendar/nepali-calendar.php

    r3263598 r3263606  
    460460                return sprintf(
    461461                // 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' ),
    463463                    $english_range['first'],
    464464                    $english_range['last']
     
    467467
    468468            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' );
    470470            }
    471471
    472472            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' );
    474474            }
    475475
     
    492492                return sprintf(
    493493                // 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' ),
    495495                    $nepali_range['first'],
    496496                    $nepali_range['last']
     
    499499
    500500            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' );
    502502            }
    503503
    504504            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' );
    506506            }
    507507
  • nepali-date-converter/trunk/inc/functions/functions.php

    r3263598 r3263606  
    139139        switch ( true ) {
    140140            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 );
    145143                break;
    146144            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 );
    151147                break;
    152148            case $diff < DAY_IN_SECONDS:
    153149                $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 );
    157151                break;
    158152            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 );
    163155                break;
    164156            case $diff < MONTH_IN_SECONDS:
    165157                $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 );
    169159                break;
    170160            case $diff < YEAR_IN_SECONDS:
    171161                $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 );
    175163                break;
    176164            default:
    177165                $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 */
    184176        $since = strtr( $since, ndc_nepali_calendar()->eng_nep_num );
    185177
     
    196188        return apply_filters( 'ndc_human_time_diff', $since, $diff, $from, $to );
    197189    }
     190
    198191}
    199192
  • nepali-date-converter/trunk/languages/nepali-date-converter.pot

    r3263598 r3263606  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: Nepali Date Converter 3.0.0\n"
     5"Project-Id-Version: Nepali Date Converter 3.0.1\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/nepali-date-converter\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
     
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2025-03-28T17:37:04+00:00\n"
     12"POT-Creation-Date: 2025-03-28T18:35:27+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.6.0\n"
     
    5959
    6060#: inc/class/ndc-post-date.php:142
    61 #: inc/class/ndc-post-date.php:263
     61#: inc/class/ndc-post-date.php:264
    6262msgid "Date Format"
    6363msgstr ""
    6464
    6565#: inc/class/ndc-post-date.php:150
    66 #: inc/class/ndc-post-date.php:311
    67 #: inc/class/ndc-post-date.php:314
     66#: inc/class/ndc-post-date.php:312
     67#: inc/class/ndc-post-date.php:315
    6868msgid "Force Format"
    6969msgstr ""
     
    128128msgstr ""
    129129
    130 #: inc/class/ndc-post-date.php:285
     130#: inc/class/ndc-post-date.php:286
    131131msgid "Custom:"
    132132msgstr ""
    133133
    134 #: inc/class/ndc-post-date.php:286
     134#: inc/class/ndc-post-date.php:287
    135135msgid "enter a custom date format in the following field"
    136136msgstr ""
    137137
    138 #: inc/class/ndc-post-date.php:290
     138#: inc/class/ndc-post-date.php:291
    139139msgid "Custom date format:"
    140140msgstr ""
    141141
    142 #: inc/class/ndc-post-date.php:294
    143 #: inc/class/ndc-post-date.php:372
     142#: inc/class/ndc-post-date.php:295
     143#: inc/class/ndc-post-date.php:373
    144144msgid "Preview:"
    145145msgstr ""
    146146
    147 #: inc/class/ndc-post-date.php:315
     147#: inc/class/ndc-post-date.php:316
    148148msgid "When enabled, hard coded formats will be ignored. Example:"
    149149msgstr ""
    150150
    151 #: inc/class/ndc-post-date.php:331
    152 #: inc/class/ndc-post-date.php:334
     151#: inc/class/ndc-post-date.php:332
     152#: inc/class/ndc-post-date.php:335
    153153msgid "Front Page"
    154154msgstr ""
    155155
    156 #: inc/class/ndc-post-date.php:339
     156#: inc/class/ndc-post-date.php:340
    157157msgid "Home - Blog Home"
    158158msgstr ""
    159159
    160 #: inc/class/ndc-post-date.php:342
     160#: inc/class/ndc-post-date.php:343
    161161msgid "Home (Blog Home)"
    162162msgstr ""
    163163
    164 #: inc/class/ndc-post-date.php:347
    165 #: inc/class/ndc-post-date.php:350
     164#: inc/class/ndc-post-date.php:348
     165#: inc/class/ndc-post-date.php:351
    166166msgid "Archive"
    167167msgstr ""
    168168
    169 #: inc/class/ndc-post-date.php:355
    170 #: inc/class/ndc-post-date.php:358
     169#: inc/class/ndc-post-date.php:356
     170#: inc/class/ndc-post-date.php:359
    171171msgid "Single"
    172172msgstr ""
    173173
    174 #: inc/class/ndc-post-date.php:363
    175 #: inc/class/ndc-post-date.php:365
     174#: inc/class/ndc-post-date.php:364
     175#: inc/class/ndc-post-date.php:366
    176176msgid "Suffix"
    177177msgstr ""
    178178
    179 #: inc/class/ndc-post-date.php:368
     179#: inc/class/ndc-post-date.php:369
    180180msgid "Example"
    181181msgstr ""
    182182
    183 #: inc/class/ndc-post-date.php:389
     183#: inc/class/ndc-post-date.php:390
    184184msgid "No post types found!"
    185185msgstr ""
    186186
    187 #: inc/class/ndc-post-date.php:419
     187#: inc/class/ndc-post-date.php:420
    188188msgid "Security check failed"
    189189msgstr ""
    190190
    191 #: inc/class/ndc-post-date.php:548
     191#: inc/class/ndc-post-date.php:549
    192192msgid "Error generating date preview"
    193193msgstr ""
    194194
    195 #: inc/class/ndc-post-date.php:562
     195#: inc/class/ndc-post-date.php:563
    196196msgid "Date format not provided"
    197197msgstr ""
    198198
    199 #: inc/class/ndc-post-date.php:570
     199#: inc/class/ndc-post-date.php:571
    200200msgid "Invalid date format"
     201msgstr ""
     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
     206msgid "Supported only between %1$d-%2$d"
     207msgstr ""
     208
     209#: inc/frameworks/nepali-calendar/nepali-calendar.php:469
     210#: inc/frameworks/nepali-calendar/nepali-calendar.php:501
     211msgid "Error! month value can be between 1-12 only"
     212msgstr ""
     213
     214#: inc/frameworks/nepali-calendar/nepali-calendar.php:473
     215msgid "Error! day value can be between 1-31 only"
     216msgstr ""
     217
     218#: inc/frameworks/nepali-calendar/nepali-calendar.php:505
     219msgid "Error! day value can be between 1-32 only"
    201220msgstr ""
    202221
  • nepali-date-converter/trunk/nepali-date-converter.php

    r3263598 r3263606  
    44Plugin URI: https://www.addonspress.com/wordpress-plugins/nepali-date-converter/
    55Description: Convert English to Nepali Date and Vice Versa and Post Date to Nepali Date.
    6 Version: 3.0.0
     6Version: 3.0.1
    77Author: addonspress
    88Author URI: https://www.addonspress.com/
     
    1717}
    1818/*Define Constants for this plugin*/
    19 define( 'NEPALI_DATE_CONVERTER_VERSION', '3.0.0' );
     19define( 'NEPALI_DATE_CONVERTER_VERSION', '3.0.1' );
    2020define( 'NEPALI_DATE_CONVERTER_PATH', plugin_dir_path( __FILE__ ) );
    2121define( 'NEPALI_DATE_CONVERTER_URL', plugin_dir_url( __FILE__ ) );
  • nepali-date-converter/trunk/readme.txt

    r3263601 r3263606  
    11=== 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.
    9 License: GPLv2 or later 
     2Contributors: addonspress, acmeit, codersantosh
     3Donate link: https://www.addonspress.com/
     4Tags: Nepali post date, Nepali date converter, today Nepali date, English to Nepali date converter, Nepali to English date converter
     5Requires at least: 4.9
     6Tested up to: 6.7
     7Requires PHP: 7.2
     8Stable tag: 3.0.1
     9License: GPLv2 or later
    1010License URI: http://www.gnu.org/licenses/gpl-2.0.html 
    1111
     
    1313
    1414== Description ==
    15 
    1615Nepali 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.
    1716
     
    123122== Changelog ==
    124123
     124= 3.0.1 - 2025-03-29 =
     125* Fixed: Few translation issue
     126
    125127= 3.0.0 - 2025-03-28 =
    126128* Rewrite: Complete plugin rewrite with modern codebase
Note: See TracChangeset for help on using the changeset viewer.