Plugin Directory

Changeset 2933070


Ignore:
Timestamp:
07/02/2023 06:34:26 PM (3 years ago)
Author:
laugei
Message:

Add support for i18n and fix bug with escaped URLs

Location:
text-domain-inspector/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • text-domain-inspector/trunk/readme.txt

    r2140457 r2933070  
    33Tags: text-domain, text, domain, inspector, translation
    44Requires at least: 4.6
    5 Tested up to: 5.2
    6 Stable tag: 1.0
     5Tested up to: 6.2.2
     6Stable tag: 1.1
    77License: GPLv2 or later
    88License URI: https://www.gnu.org/licenses/gpl-2.0.html
     
    4242
    4343== Changelog ==
     44### 1.1
     45
     46* Added support for i18n
     47* Text domain is now appended as a query param if string is a URL (fixes the error for WP >= 5.9)
     48
    4449### 1.0
    4550
  • text-domain-inspector/trunk/text-domain-inspector.php

    r1908015 r2933070  
    44Description: This plugin allows to inspect text domains of translatable strings
    55Author: Sti3bas
    6 Version: 1.0
     6Version: 1.1
    77Author URI: https://github.com/sti3bas
    88*/
     
    7171    public function addShortcode($translatedText, $text, $domain)
    7272    {
     73        if(substr( $translatedText, 0, 4 ) === "http") {
     74            return add_query_arg( 'textdomain', $domain, $translatedText );
     75        }
     76       
    7377        return $translatedText.'[textdomain='.$domain.';]';
    7478    }
     
    121125    protected function buildAdminBarMenuTitle()
    122126    {
    123         return $this->isTurnedOn() ? 'Turn off Text Domain Inspector' : 'Inspect Text Domains';
     127        return  $this->isTurnedOn() ? __('Turn off Text Domain Inspector', 'text-domain-inspector') : __('Inspect Text Domains', 'text-domain-inspector');
    124128    }
    125129}
Note: See TracChangeset for help on using the changeset viewer.