ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: forumovod on September 15, 2020, 02:42:54 am

Title: Which file should contain the string "insert"?
Post by: forumovod on September 15, 2020, 02:42:54 am
Which file should contain the string "insert"? I can't find it for translation.
(Link-6589)
Title: Re: Which file should contain the string "insert"?
Post by: Antechinus on September 15, 2020, 03:15:12 am
I think it's Line 50 of Editor.english.php:

Code: [Select]
$editortxt['Insert'] = 'Insert';
Title: Re: Which file should contain the string "insert"?
Post by: radu81 on September 15, 2020, 04:06:49 am
Not that, I have that line translated and I still see the english text.

edit
it's hardcoded into /themes/default/Post.template.php at line 453
Code: [Select]
						<input type="button" class="button" value="insert">

I move this topic to Bug Reports
Title: Re: Which file should contain the string "insert"?
Post by: forumovod on September 15, 2020, 12:25:01 pm
Quote from: Antechinus – I think it's Line 50 of Editor.english.php
This is not such a string.

Quote from: radu81 – edit
it's hardcoded into /themes/default/Post.template.php at line 453
Code: [Select]
						<input type="button" class="button" value="insert">
Yes, this is exactly what you need. Thanks.
Title: Re: Which file should contain the string "insert"?
Post by: emanuele on September 16, 2020, 02:09:14 pm
ARG!
Dang.

https://github.com/elkarte/Elkarte/commit/029ca2c267ebf3806253da74e816c44400a8f5ee
Title: Re: Which file should contain the string "insert"?
Post by: forumovod on September 16, 2020, 05:14:27 pm
Quote from: emanuele – ARG!
Dang.

https://github.com/elkarte/Elkarte/commit/029ca2c267ebf3806253da74e816c44400a8f5ee

The code is the difference between insert and Insert. Is this correct? Or another language file?
Post.template.php
Code: [Select]
<input type="button" class="button" value="' . $txt['insert'] . '">
Editor.english.php
Code: [Select]
$editortxt['Insert'] = 'Insert';
Title: Re: Which file should contain the string "insert"?
Post by: Antechinus on September 16, 2020, 08:19:52 pm
The commit on GitHub shows the string going in themes/default/languages/english/Post.english.php ;)

Although it does seem a bit silly to have exactly the same string called in two separate files. I can see that confusing someone sooner or later. I would think Editor.******.php should be able to handle it. Better grumble at Ema.

Or you could just try it your way. If it works, that's even better.
Title: Re: Which file should contain the string "insert"?
Post by: emanuele on September 17, 2020, 07:34:16 am
Quote from: forumovod –
Quote from: emanuele – ARG!
Dang.

https://github.com/elkarte/Elkarte/commit/029ca2c267ebf3806253da74e816c44400a8f5ee

The code is the difference between insert and Insert. Is this correct? Or another language file?
Yes.
Green: add
Pink: remove

Quote from: forumovod – Post.template.php
Code: [Select]
<input type="button" class="button" value="' . $txt['insert'] . '">
Editor.english.php
Code: [Select]
$editortxt['Insert'] = 'Insert';
It's not Editor.english.php, it's Post.english.php and it's not $editortxt, but $txt. ;)
You see the file names at the beginning of each code block.
Title: Re: Which file should contain the string "insert"?
Post by: forumovod on September 17, 2020, 04:31:15 pm
Quote from: emanuele – It's not Editor.english.php, it's Post.english.php and it's not $editortxt, but $txt. ;)
You see the file names at the beginning of each code block.

This is understandable. But logically it should be in Editor.english.php, not in Post.english.php.
Title: Re: Which file should contain the string "insert"?
Post by: emanuele on September 18, 2020, 04:19:15 pm
Well, I'm pretty sure it has to be in Post.english.php, but if you know the logic behind the files in Elk, more than I do, then be my guest.
Title: Re: Which file should contain the string "insert"?
Post by: augras on February 24, 2021, 10:11:12 am
Hi,
I'm with the 1.1.7 patch since some weeks to test it and this problem is still here : is it possible to include the solution in the patch ?
Title: Re: Which file should contain the string "insert"?
Post by: Spuds on February 24, 2021, 10:15:30 pm
It should be in there .... Are you saying to translated txt['insert'] in the Post.english.php file and its not changing? 

Unfortunerly I know there are a few duplicate stings in different language files which complicates things, but the system only loads the language files that are required (requested) at the time, not all are available all the time.
Title: Re: Which file should contain the string "insert"?
Post by: augras on February 25, 2021, 11:34:37 am
Hi @Spuds ,
i'm saying there is no channel txt['insert'] in the Post.english.php
no code <input type="button" class="button" value="' . $txt['insert'] . '"> in post.template.php.
There are the channels $editortxt['Insert'] = 'Insert'; in Editor.english.php and $editortxt['Insert'] = 'Insérer'; in Editor.french.php but it's not the same 'Insert'.
Title: Re: Which file should contain the string "insert"?
Post by: radu81 on February 25, 2021, 05:47:51 pm
Quote from: augras – no code <input type="button" class="button" value="' . $txt['insert'] . '"> in post.template.php.
that is strange, I have a test forum 1.1.6 + 1.1.7 patch and I see that in Post.template.php

do you have:
Code: [Select]
						<input type="button" class="button" value="insert">
?

In my Post.italian.php there is no
$txt['insert'] = 'Insert;
but after adding manually I see the "Insert" word translated correctly.
Title: Re: Which file should contain the string "insert"?
Post by: augras on February 26, 2021, 11:28:10 am
Quote from: radu81 –
Quote from: augras – no code <input type="button" class="button" value="' . $txt['insert'] . '"> in post.template.php.
that is strange, I have a test forum 1.1.6 + 1.1.7 patch and I see that in Post.template.php

do you have:
Code: [Select]
						<input type="button" class="button" value="insert">
?
Hi,
I have the same thing on my old forum and on a new fresh one i made to test.
I have no more this line :
Code: [Select]
						<input type="button" class="button" value="insert">

If i insert manually $txt['Insert'] = 'Insérer'; in my Post.french.php i get an error when i want to edit a post

(Link-6959)
Title: Re: Which file should contain the string "insert"?
Post by: radu81 on February 26, 2021, 03:53:54 pm
it should be:
Code: [Select]
$txt['insert'] = 'Insérer';
and not
Code: [Select]
$txt['Insert'] = 'Insérer';
Title: Re: Which file should contain the string "insert"?
Post by: Spuds on February 26, 2021, 05:09:51 pm
Since that is a 1.1.7 change, its likely that Post.english.txt has not been updated on Transifex ... so $txt['insert'] = 'Insert'; may not exist in that file for it to be translated.
Title: Re: Which file should contain the string "insert"?
Post by: augras on February 27, 2021, 04:09:21 am
Hi,

Your eyes are very good @radu81 : the translation works like you say, but will not be here when an update will be made because @Spuds is right (this line is not on transifex in the Post.english.php file and can't be translate).
Title: Re: Which file should contain the string "insert"?
Post by: radu81 on February 27, 2021, 02:35:40 pm
Glad you solved, I don't know how Transifex works, probably it will be available when 1.1.7 patch will be officially released

=== edit ===
I missed this post
QuoteSince that is a 1.1.7 change, its likely that Post.english.txt has not been updated on Transifex ... so $txt['insert'] = 'Insert'; may not exist in that file for it to be translated.
Title: Re: Which file should contain the string "insert"?
Post by: augras on February 28, 2021, 05:12:48 am
Thank you @radu81,
As you have seen there is no relation with the 1.1.7 patch : just the line that lakes in the Post.english.php on transifex, if i understand correctly...
Title: Re: Which file should contain the string "insert"?
Post by: augras on May 24, 2021, 01:13:22 pm
Quote from: radu81 – Glad you solved, I don't know how Transifex works, probably it will be available when 1.1.7 patch will be officially released
Hi,
it seems it's not in the new files on tranifex (i did'nt found it in the post file).
Philippe
Title: Re: Which file should contain the string "insert"?
Post by: radu81 on May 24, 2021, 05:59:51 pm
I just downloaded the french translation from https://translations.elkarte.net/french_1-1-3.zip and inside Post.french.php at line 183 I see:
Code: [Select]
$txt['insert'] = 'Insérer';
Check if you have that on your forum, otherwise update the translation.

I also checked on Transifex and I see there is that translation
Title: Re: Which file should contain the string "insert"?
Post by: augras on May 25, 2021, 12:27:08 pm
You are right @radu81 : sorry for that.
I made some translations on new channels to update the new translations with the patch1.1.7 yesterday and i made my search on "insert" in channels with no translations, and nothing appears... because there is nothing to translate : it seems i made this translation one month ago but i don't remember it and i didn't update my 2 elkarte to test, that is very strange.
It works fine.
Philippe