Plugin Directory

Changeset 2875429


Ignore:
Timestamp:
03/06/2023 03:38:08 PM (3 years ago)
Author:
ilovecats7
Message:

Fixed bug where not all cyrillic characters were replaced

Location:
latin-now/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • latin-now/trunk/latin-now.php

    r2550397 r2875429  
    33 * Plugin Name: Latin Now!
    44 * Description: Converts Serbian Cyrillic characters into the Latin alphabet. No configuration required.
    5  * Version: 2.0.0
     5 * Version: 2.1.0
    66 * Author: Vukica Tomić
    77 * Text Domain: latin-now
     
    1212
    1313// Define constants
    14 defined( 'LT_NOW_CYRILLIC' ) or define( 'LT_NOW_CYRILLIC', array( 'Б', 'В', 'Г', 'Д', 'Ђ', 'Ж', 'З', 'И', 'Л', 'Љ', 'Н', 'Њ', 'П', 'Р', 'С', 'Ћ', 'У', 'Ф', 'Х', 'Ц', 'Ч', 'Џ', 'Ш', 'б', 'в', 'г', 'д', 'ђ', 'ж', 'з', 'и', 'к', 'л', 'љ', 'м', 'н', 'њ', 'п', 'р', 'с', 'т', 'ћ', 'у', 'ф', 'х', 'ц', 'ч', 'џ', 'ш' ) );
    15 defined( 'LT_NOW_LATIN' ) or define( 'LT_NOW_LATIN', array( 'B', 'V', 'G', 'D', 'Đ', 'Ž', 'Z', 'I', 'L', 'Lj', 'N', 'Nj', 'P', 'R', 'S', 'Ć', 'U', 'F', 'H', 'C', 'Č', 'Dž', 'Š', 'b', 'v', 'g', 'd', 'đ', 'ž', 'z', 'i', 'k', 'l', 'lj', 'm', 'n', 'nj', 'p', 'r', 's', 't', 'ć', 'u', 'f', 'h', 'c', 'č', 'dž', 'š' ) );
     14defined( 'LT_NOW_CYRILLIC' ) or define( 'LT_NOW_CYRILLIC', array( 'А', 'Б', 'В', 'Г', 'Д', 'Ђ', 'Е', 'Ж', 'З', 'И', 'Ј', 'К', 'Л', 'Љ', 'М', 'Н', 'Њ', 'О', 'П', 'Р', 'С', 'Т', 'Ћ', 'У', 'Ф', 'Х', 'Ц', 'Ч', 'Џ', 'Ш', 'а', 'б', 'в', 'г', 'д', 'ђ', 'е', 'ж', 'з', 'и', 'ј', 'к', 'л', 'љ', 'м', 'н', 'њ', 'о', 'п', 'р', 'с', 'т', 'ћ', 'у', 'ф', 'х', 'ц', 'ч', 'џ', 'ш' ) );
     15defined( 'LT_NOW_LATIN' ) or define( 'LT_NOW_LATIN', array( 'A', 'B', 'V', 'G', 'D', 'Đ', 'E', 'Ž', 'Z', 'I', 'J', 'K', 'L', 'Lj', 'M', 'N', 'Nj', 'O', 'P', 'R', 'S', 'T', 'Ć', 'U', 'F', 'H', 'C', 'Č', 'Dž', 'Š', 'a', 'b', 'v', 'g', 'd', 'đ', 'e', 'ž', 'z', 'i', 'j', 'k', 'l', 'lj', 'm', 'n', 'nj', 'o', 'p', 'r', 's', 't', 'ć', 'u', 'f', 'h', 'c', 'č', 'dž', 'š' ) );
    1616defined( 'LT_NOW_CYR_UNICODE' ) or define( 'LT_NOW_CYR_UNICODE', array( 'u0411', 'u0412', 'u0413', 'u0414', 'u0402', 'u0416', 'u0417', 'u0418', 'u041b', 'u0409', 'u041d', 'u040a', 'u041f', 'u0420', 'u0421', 'u040b', 'u0423', 'u0424', 'u0425', 'u0426', 'u0427', 'u040f', 'u0428', 'u0431', 'u0432', 'u0433', 'u0434', 'u0452', 'u0436', 'u0437', 'u0438', 'u043a', 'u043b', 'u0459', 'u043c', 'u043d', 'u045a', 'u043f', 'u0440', 'u0441', 'u0442', 'u045b', 'u0443', 'u0444', 'u0445', 'u0446', 'u0447', 'u045f', 'u0448' ) );
    1717defined( 'LT_NOW_LAT_UNICODE' ) or define( 'LT_NOW_LAT_UNICODE', array( 'u0042', 'u0056', 'u0047', 'u0044', 'u0110', 'u017d', 'u005a', 'u0049', 'u004c', 'u004c\u006a', 'u004e', 'u004e\u006a', 'u0050', 'u0052', 'u0053', 'u0106', 'u0055', 'u0046', 'u0048', 'u0043', 'u010c', 'u0044\u017e', 'u0160', 'u0062', 'u0076', 'u0067', 'u0064', 'u0111', 'u017e', 'u007a', 'u0069', 'u006b', 'u006c', 'u006c\u006a', 'u006d', 'u006e', 'u006e\u006a', 'u0070', 'u0072', 'u0073', 'u0074', 'u0107', 'u0075', 'u0066', 'u0068', 'u0063', 'u010d', 'u0064\u017e', 'u0161' ) );
    1818
    1919// Add character filters if WP language is set to Serbian
    20 if ( !function_exists( 'lt_now_kill_cirilica' ) ) {
     20if ( ! function_exists( 'lt_now_kill_cirilica' ) ) {
    2121    function lt_now_kill_cirilica() {
    2222        $language = get_locale();
     
    3232}
    3333
    34 if ( !function_exists( 'lt_now_get_latin' ) ) {
    35     function lt_now_get_latin($translation, $text, $domain) {
     34if ( ! function_exists( 'lt_now_get_latin' ) ) {
     35    function lt_now_get_latin( $translation, $text, $domain ) {
    3636        $translation = str_replace( LT_NOW_CYRILLIC, LT_NOW_LATIN, $translation );
    3737        return $translation;
     
    3939}
    4040
    41 if ( !function_exists( 'lt_now_get_latin_context' ) ) {
     41if ( ! function_exists( 'lt_now_get_latin_context' ) ) {
    4242    function lt_now_get_latin_context( $translation, $text, $context, $domain ) {
    4343        $translation = str_replace( LT_NOW_CYRILLIC, LT_NOW_LATIN, $translation );
     
    4646}
    4747
    48 if ( !function_exists( 'lt_now_get_latin_n' ) ) {
     48if ( ! function_exists( 'lt_now_get_latin_n' ) ) {
    4949    function lt_now_get_latin_n( $translation, $single, $plural, $number, $domain ) {
    5050        $translation = str_replace( LT_NOW_CYRILLIC, LT_NOW_LATIN, $translation );
     
    5353}
    5454
    55 if ( !function_exists( 'lt_now_get_latin_n_context' ) ) {
     55if ( ! function_exists( 'lt_now_get_latin_n_context' ) ) {
    5656    function lt_now_get_latin_n_context( $translation, $single, $plural, $number, $context, $domain ) {
    5757        $translation = str_replace( LT_NOW_CYRILLIC, LT_NOW_LATIN, $translation );
     
    6161
    6262// For JavaScript translations
    63 if ( !function_exists( 'lt_now_get_latin_scripts' ) ) {
     63if ( ! function_exists( 'lt_now_get_latin_scripts' ) ) {
    6464    function lt_now_get_latin_scripts( $translations, $file, $handle, $domain ) {
    6565        $translations = str_replace( LT_NOW_CYR_UNICODE, LT_NOW_LAT_UNICODE, $translations );
  • latin-now/trunk/readme.txt

    r2550402 r2875429  
    33Tags: cyrillic, latin, serbian, transliteration, admin panel, admin
    44Requires at least: 5.0
    5 Tested up to: 5.7.2
     5Tested up to: 6.1.1
    66Requires PHP: 7.0
    7 Stable tag: 2.0.0
     7Stable tag: 2.1.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    3232* Expanded filtered text to include all translatable text, including text from themes and plugins
    3333
     34= 2.1.0 =
     35* Fixed bug where not all cyrillic characters were replaced
     36
    3437== Upgrade Notice ==
     38
     39= 2.1.0 =
     40This version fixes a bug where not all cyrillic characters were replaced.
    3541
    3642= 2.0.0 =
Note: See TracChangeset for help on using the changeset viewer.