Skip to content

Commit ba0be17

Browse files
author
cleissonbr
committed
same fix
1 parent 20aae08 commit ba0be17

19 files changed

+478
-266
lines changed

article-gen.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,10 @@ public function localization_setup() {
263263

264264
// Load the React-pages translations.
265265
if ( is_admin() ) {
266-
// Load wp-script translation for article-generator-app
266+
// Load wp-script translation
267267
wp_set_script_translations( 'article-generator-app', 'article-gen', plugin_dir_path( __FILE__ ) . 'languages/' );
268+
wp_set_script_translations( 'ag-create-text-editor-script', 'article-gen', plugin_dir_path( __FILE__ ) . 'languages/' );
269+
wp_set_script_translations( 'ag-img-generator-editor-script', 'article-gen', plugin_dir_path( __FILE__ ) . 'languages/' );
268270
}
269271
}
270272

includes/Assets/Manager.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,5 +110,10 @@ public function enqueue_admin_assets() {
110110

111111
wp_enqueue_style( 'article-generator-css' );
112112
wp_enqueue_script( 'article-generator-app' );
113+
wp_localize_script( 'article-generator-app', 'article_gen',
114+
array(
115+
'version' => ARTICLE_GEN_VERSION
116+
)
117+
);
113118
}
114119
}

includes/Blocks/Manager.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protected function register_block_metas(): void {
6363

6464
if ( file_exists( $markup_file_path ) ) {
6565
$block_options['render_callback'] = function( $attributes, $content, $block ) use ( $markup_file_path ) {
66-
$context = $block->context;
66+
$context = $block->context;
6767
ob_start();
6868
include $markup_file_path;
6969
return ob_get_clean();

languages/article-gen-pt_BR-c011e122233ae2cfbbbe9d409606201a.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"translation-revision-date": "2023-04-08 04:53+0000",
2+
"translation-revision-date": "2023-04-08 15:44+0000",
33
"generator": "Loco https://localise.biz/",
44
"source": "build/blocks/ai-complete/index.js",
55
"domain": "article-gen",
@@ -31,6 +31,18 @@
3131
"Error": [
3232
"Erro"
3333
],
34+
"Failed to generate article. Make sure you entered the API Key in the settings": [
35+
"Falha ao gerar o artigo. Certifique-se de inserir a chave API nas configura\u00e7\u00f5es"
36+
],
37+
"Generate": [
38+
"Gerar"
39+
],
40+
"Generating...": [
41+
"Gerando..."
42+
],
43+
"GPT Text Generator": [
44+
"Gerador de Texto (GPT)"
45+
],
3446
"Hour": [
3547
"Hora"
3648
],
@@ -40,6 +52,15 @@
4052
"Minute": [
4153
"Minuto"
4254
],
55+
"OpenAI API key not configured": [
56+
"Chave de API OpenAI n\u00e3o configurada"
57+
],
58+
"Please enter a valid prompt": [
59+
"Insira um prompt v\u00e1lido"
60+
],
61+
"Select context": [
62+
"Selecione o contexto"
63+
],
4364
"Settings": [
4465
"Configura\u00e7\u00f5es"
4566
],

languages/article-gen-pt_BR-c2fb37e514601deebeb2549682342f7c.json

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"translation-revision-date": "2023-04-08 04:53+0000",
2+
"translation-revision-date": "2023-04-08 15:44+0000",
33
"generator": "Loco https://localise.biz/",
44
"source": "build/blocks/ai-gen-image/index.js",
55
"domain": "article-gen",
@@ -13,6 +13,9 @@
1313
"-- Select --": [
1414
"-- Selecione --"
1515
],
16+
"An error occurred during your request.": [
17+
"Ocorreu um erro durante sua solicita\u00e7\u00e3o."
18+
],
1619
"Creating your image": [
1720
"Criando sua imagem"
1821
],
@@ -22,6 +25,24 @@
2225
"Feature under development, will be available soon": [
2326
"Recurso em desenvolvimento, estar\u00e1 dispon\u00edvel em breve"
2427
],
28+
"Generate image": [
29+
"Gerar imagem"
30+
],
31+
"Generating image...": [
32+
"Gerando imagem..."
33+
],
34+
"GPT Image Generator": [
35+
"Gerador de imagens (GPT)"
36+
],
37+
"OpenAI API key not configured": [
38+
"Chave de API OpenAI n\u00e3o configurada"
39+
],
40+
"Please enter a valid prompt": [
41+
"Insira um prompt v\u00e1lido"
42+
],
43+
"Select image size": [
44+
"Selecione o tamanho da imagem"
45+
],
2546
"Settings": [
2647
"Configura\u00e7\u00f5es"
2748
],

languages/article-gen-pt_BR-dfbff627e6c248bcb3b61d7d06da9ca9.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"translation-revision-date": "2023-04-08 04:53+0000",
2+
"translation-revision-date": "2023-04-08 15:44+0000",
33
"generator": "Loco https://localise.biz/",
44
"source": "build/index.js",
55
"domain": "article-gen",
@@ -34,6 +34,9 @@
3434
"Are you sure?": [
3535
"Tem certeza?"
3636
],
37+
"Article Generator": [
38+
"Gerador de artigos"
39+
],
3740
"Back to contexts": [
3841
"Voltar para contextos"
3942
],

languages/article-gen-pt_BR.mo

831 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)