• Hi @timwhitlock, thanks for the awesome plugin! I have been using it for a long time.

    Today, I was developing a Gutenberg block and generated a .pot file using wp i18n make-pot. The file at languages/plugin.pot includes all the translatable strings from index.js, edit.js, etc.

    However, LocoTranslate is not able to translate those files.

    Are you aware of this issue?

    I am including some code below:

    // index.js
    <span style="font-family: inherit; font-size: 0.8rem;">import { __ } from '@wordpress/i18n';</span>
    <span style="font-family: inherit; font-size: 0.8rem;">import { PanelBody, ToggleControl } from '@wordpress/components';</span>
    <span style="font-family: inherit; font-size: 0.8rem;"></span>
    // Return Edit component
    <InspectorControls>
    <PanelBody title={ __( 'Settings', 'plugin' ) }>
    <ToggleControl
    label={ __( 'Fixed width table cells', 'plugin' ) }
    checked={ hasFixedLayout }
    onChange={ ( value ) =>
    setAttributes( { hasFixedLayout: value } )
    }
    />
    <ToggleControl
    label={ __( 'Hide Table Title', 'plugin' ) }
    checked={ hideTableTitle }
    onChange={ ( value ) =>
    setAttributes( { hideTableTitle: value } )
    }
    />
    </PanelBody>
    </InspectorControls>
Viewing 1 replies (of 1 total)
  • Plugin Author Tim W

    (@timwhitlock)

    Can you please clarify “not able to translate”?

    (1) If the strings are extracted to your POT, then open your PO file and “Sync” from the POT. Do the strings appear editable in the editor?

    (2) When you save the PO, you should get JSON files generated for your JS translations. Does this work?

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