Yoast / yoast-components

Accessible React components by Yoast
GNU General Public License v3.0
21 stars 6 forks source link

Load translation inside lifecycle function #733

Closed moorscode closed 6 years ago

moorscode commented 6 years ago

Otherwise the textdomain is not available yet and the text will not be translated. Resolves the "textdomain 'yoast-components' not found"

Summary

This PR can be summarized in the following changelog entry:

Relevant technical choices:

*

Test instructions

This PR can be tested by following these steps:

Fixes #

abotteram commented 6 years ago

I made some changes to make sure texts are not unnecessarily translated.

moorscode commented 6 years ago

I made some changes to make sure texts are not unnecessarily translated.

These are not optimizations that matter. The translations are just in a long list (key->value), so retrieving an item from that list does not do any "translating" at all.

andizer commented 6 years ago

CR done 👍

Dieterrr commented 6 years ago

I cannot reproduce the "error about the textdomain" but everything works as it should in the PR.

So, acceptance done 👍