Plugin Author
Tim W
(@timwhitlock)
String extraction requires you specify your text domain as a string literal in your code, and your bundle is configured with the correct text domain.
Are these two things in place? If they are then please post more detail.
-
This reply was modified 7 years, 4 months ago by Tim W.
-
This reply was modified 7 years, 4 months ago by Tim W.
My theme is underscores based (http://underscores.me/).
In my functions.php
I have
load_theme_textdomain('mif', get_template_directory() . '/languages');
and in functions I do use string literals like $operator = __('Operaattori', 'mif');
But when I sync the .pot file, no “Operaattori” is found.
-
This reply was modified 7 years, 4 months ago by einomies.
-
This reply was modified 7 years, 4 months ago by einomies.
Plugin Author
Tim W
(@timwhitlock)
and your bundle is configured with the correct text domain
What I meant was that Loco Translate needs to know that the text domain is “mif”. If it hasn’t guessed it automatically, it must be configured. Is this configured?
See: https://localise.biz/wordpress/plugin/manual#configure
Ah, I’m an idiot. The remote server had older version of the functions.php which didn’t have the literals so of course they were missing in loco…
Bundle was auto configured correctly.
Sorry for wasting your time! Solved.