Custom Fields
Support MB Custom Post Type Problem with PO/MO in new version — labels but revert to English after saving

  • Creator
  • #23395
    Resolved Teia Local Studio

    Hello there!

    Previous versions worked like a charm using a custom PO/MO in pt_BR located inside my theme. After updating today (using AIO) things changed on MBCustomPostType extension (I really was fond of the previous interface) — and now my pt-BR translation is gone for good.

    But the worst part is — no matter what label I change while creating a CPT or taxonomy, they always revert back to English.

    What I was doing — just before "boot" the MetaBox stuff, in my functions.php, I was calling my PO/MOs for the extensions I use:

    load_textdomain( 'meta-box', MY_PATH.'/languages/plugins/meta-box-'.get_locale().'.mo' );
    load_textdomain( 'mb-custom-post-type', MY_PATH.'/languages/plugins/mb-custom-post-type-'.get_locale().'.mo' );

    What should I do now? Is it a matter of calling a new PO/MO? Perhaps my old PO/MOs are not up to date?

    Thank you!

Viewing 10 replies - 1 through 10 (of 12 total)
  • Author
  • #23399
    Long Nguyen

    Hi Giovani,

    I can create a new Post type or Taxonomy with my language (Vietnamese) as well. It does not revert back to English while creating or updating. See my screenshots:

    Regarding the translation is gone, I recommend using Loco Translate to translate the extension's text to your language (BR). Loco also helps you to scan (new) text and loads the correct file MO.

    Teia Local Studio

    Dear Long,

    I can't still figure out what could be the problem, but I will take a look on Loco translate. More info:

    The MBCPT plugin itself is loading in English (not a big problem for me), but what I refer too is the content of each label. They are also in English, of course, but I can't modify them permanently. Steps:

    1. I do create a "Foo" custom post, all OK.
    2. I name plural and singular, "Foos" anf "Foo", all OK.

    1. I go to CPT labels and change from, for example, "Add new Foo" to "Adicionar Novo Foo". And I change "All Foos" to "Todos os Foos"... And it is ALMOST OK.

    The changes are made, the labels are indeed modified, but the text field itself, on the plugin, retains the old value in English. If I need, for some reason, edit the CPT again, I need to rename aaaall labels once more, otherwise the will be re-saved with the original English values the plugin provides.

    If I radically change it to any crazy text, it get's saved, but upon entering the CPT's edit screen again, the value will not be there.

    But is is strange, because the same problem happened using just free the MB and MBCPT on on a different theme, a commercial one (mine is all custom and I use premium AIO). On both themes I just activate MB's plugins and use a custom code to "boot" the metaboxes (did learn on your old tutorials). Perhaps my custom way of starting MB internals is breaking something?

    This is the way I do:

    function teialocal_register_meta_boxes() {
            include 'boxes/post.php';
            include 'boxes/page.php';
            if (post_type_exists('case'))     { include 'boxes/case.php'; }
            if (post_type_exists('event'))    { include 'boxes/event.php'; }            
        return $meta_boxes; 
    add_filter( 'rwmb_meta_boxes', 'teialocal_register_meta_boxes' );

    I will try MB + MBCPT on a default WordPress template to check if it happens there as well.


    Teia Local Studio

    Dear Long,

    Got LOCO working (still learning how to handle it) and make progress translating MB-CPT plugin English terms to Portuguese, however, LOCO can't locate any of the ENGLISH LABEL TERMS. They are nowhere to be found on the compiled brand new POT file.

    I really need to translate the labels itself, not the plugin screens...
    Need to put in Portuguese the field values, like:

    Add new XXX,
    All XXX,
    Edit XXX,
    New name for XXX,
    View XXX,
    Search XXX,
    etc, etc.

    Upon a quick inspection, these values are hard coded inside minified JS files:

    Or, in the end... Alt least the input text fields for the labels should retain the entered value, and not refreshing always with the default English ones.


    Teia Local Studio

    Hey there!

    Just found, inside MB-AIO folder, a fr_FR PO/MO file that contains the strings I look forward to have translated... But I have no idea how to add this and where add this to my Portuguese WordPress. Everything is sooo confusing. I can't even turn off pt_BR global translation (for a test)!

    What should I do?
    Can someone provide some simple steps?

    In time:

    LOCO shows me a lot of stuff from MetaboxAIO, but does not show me nothing related to the regular MetaBox base plugin at all.

    Teia Local Studio


    Just did a clean install of WordPress.
    Default official theme. Nothing changed or custom.

    Everything works fine BUT the custom post types and taxonomies label values.

    The only one who retains the modified value is the very first field — ADD NEW.
    The other fields, when you change the label value (although saving to database), revert back to the default English term when the screen reloads.

    Imagine having 10 CPTs, all with nice labels in other language... Then you need to edit all of them, form some other reason, like, remove Thumbnail support, etc etc... and then, you need to re-crete all labels for all the 10 cpts, because all fields are back to their default!

    Sounds something is not right here, what do you think?
    Can you please inspect?


    Teia Local Studio

    Another problem found...

    You create a CPT, change its labels to anything else than the default. They get saved (but the fields remain in default EN). Then you think, a far as I do not edit it again, its okay...

    But then you access the extension to create a taxonomy, and, after creating it, the CPT got its labels all reset to default again.

    Oh my.


    I have exactly the same issue.
    When I go to labels tab, I can edit the first one, but another label is reverted to english when saving.
    You can see a video here :

    Thanks. Cedric.

    Teia Local Studio

    It's important to note:

    All values GET SAVED indeed. The problem is that they does not retain on the fields. If you need to edit your taxonomy or CPT you will need to write all your labels again, except for the first one (as pointed by Cedric), otherwise, on the next save, all will be reverted to English default values.

    Thanks guys!

    Teia Local Studio


    Any news?
    There is something wrong here really indeed!


    Long Nguyen

    Hi guys,

    The issue about labels auto revert to English after saving has been fixed in the new version of MB Custom Post Type 2.0.7 or MB AIO 1.12.1.

Viewing 10 replies - 1 through 10 (of 12 total)
  • You must be logged in to reply to this topic.