WordPress.org

Ready to get started?Download WordPress

Forums

Social Linkz
make makepot happy (bis) (2 posts)

  1. atao
    Member
    Posted 5 months ago #

    Sorry to bother you again!
    This is the sequel of the "[resolved]make makedot happy"... No rest allowed during sunday ;-)

    the arguments for the text domain is $this->pluginID which clearly is a dynamic name ...

    Yes, but it doesn't matter during .po/.pot files generation: makepot doesn't care about the domain argument of __() or _e() calls.
    It's very eager: it'll catch any such call in any files under a specified directory.

    if you indicate this variable in the header of the po file, makedot will find the sentences

    .po file? Or social-linkz.php...: as soon as a Text Domain field is specified inside the plugin header, makepot will catch the Description field. The value of Text Domain field isn't relevant here but only at WP run time.

    If I am right, the page installed plugin take is text from the readme.txt which cannot use the __ function

    WP uses any key provided by a .po file made available through a load_plugin_textdomain (or equivalent) call, as long as:
    - there is a Text Domain in the plugin header with a value that matches the domain argument of the load_plugin_textdomain
    - this key matches the value of the Description field inside the plugin header.

    but wordpress will not understand the link between $this->pluginID and the real value of that string ...

    Any key in the .po file associated to a domain by a load_plugin_textdomain() call will be catched by __() or _e() calls with this key if this domain is the value provided by $this->pluginID.

    What do you mean by an entry into the list ?

    A key with its translation on the view "Modify translations"

    All this stuff works fine: right now, I'm watching a WP website with Social Linkz where its presentation on the page "Installed Plugins" is in french :-)

    https://wordpress.org/plugins/social-linkz/

  2. Sed Lex
    Member
    Plugin Author

    Posted 5 months ago #

    MMMmmmm...

    I have to study that ... but not now : I am quite busy for now

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.