-
Notifications
You must be signed in to change notification settings - Fork 88
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Duplicated messages #443
Comments
The new version allows the CMS pages fields to be translated directly in the page editor, there is no need for the "Translate messages" anymore for the title, description, meta-title and meta-description. Are the messages that gets duplicated in one of those fields? Can you give examples with as much details as possible? |
Thank you mjauvin for you reply, the messages are not from the fields you mentioned, they are from photo descriptions that I use for alt-text, in my markup I use it like this: {{ photo.description|_ }} I attached a screenshot of how the "Translate Messages" section looks like. |
can you send a screenshot of the place where the original text comes from?
…--
Marc
On Thu, Feb 7, 2019, 10:10 Emiliano Mina ***@***.*** wrote:
The new version allows the CMS pages fields to be translated directly in
the page editor, there is no need for the "Translate messages" anymore for
the title, description, meta-title and meta-description.
Are the messages that gets duplicated in one of those fields? Can you give
examples with as much details as possible?
Thank you mjauvin for you reply, the messages are not from the fields you
mentioned, they are from photo descriptions that I use for alt-text, in my
markup I use it like this: {{ photo.description|_ }}
I attached a screenshot of how the "Translate Messages" section looks like.
[image: translate-duplicated]
<https://user-images.githubusercontent.com/25836873/52420716-3864f400-2ab8-11e9-95f0-01eb45dfb83a.jpg>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#443 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB65vv2emd9MraBG0ve436F-F_TwQGkXks5vLEHzgaJpZM4amK3p>
.
|
Is that for a FileUpload or MediaFinder?
…On Thu, Feb 7, 2019 at 10:55 AM Emiliano Mina ***@***.***> wrote:
Here it is
[image: alt-text]
<https://user-images.githubusercontent.com/25836873/52423810-736a2600-2abe-11e9-9630-1ddf9272d542.jpg>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#443 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB65vr39y-8k4-sWu6T79TI_wU-Gap4tks5vLExggaJpZM4amK3p>
.
--
Marc
|
FileUpload |
It's odd because you get the same behavior as if you were using a
translated field in 3 languages but you're not.
How many languages do you have for this website?
…On Thu, Feb 7, 2019 at 10:57 AM Emiliano Mina ***@***.***> wrote:
FileUpload
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#443 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB65vjLgY231ikAraeRsIs8jYrzhvz7Vks5vLEz-gaJpZM4amK3p>
.
--
Marc
|
I'm using 2, English and Spanish. |
I'll try to reproduce this.
…On Thu, Feb 7, 2019 at 11:08 AM Emiliano Mina ***@***.***> wrote:
I'm using 2, English and Spanish.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#443 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB65vri0iYxTId6FZQ7Uuvw5GdZI5dezks5vLE-KgaJpZM4amK3p>
.
--
Marc
|
Ok, thank you very much! |
How long is the text that you use as key? Is it longer than 255 chars? Can you post the records from the DB table (translate_mesaages) with all columns of one example that has many entries? |
Some of the messages are longer than 255 chars, but even the ones that aren't get duplicated |
I could not reproduce this behavior. Maybe @munxar has something here with
the key length.
Can you send a text version of one of the text exhibiting this behavior so
I can try with the same value?
…On Thu, Feb 7, 2019 at 11:12 AM munxar ***@***.***> wrote:
How long is the text that you use as key? Is it longer than 255 chars?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#443 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB65vrthrqS9fp4EPkPvHLvbm_PP7sazks5vLFBwgaJpZM4amK3p>
.
--
Marc
|
Sure, these are some messages that are getting duplicated (Just some, as almost every message has that bug) Bold 100% Cotton Table Cloth with unique and original Aroate design.2 meters x 2 meters - $40.00 #43160 cm x 3 meters - $40.00 # 44160cm x 2.5 meters - $40.00 #45160cm x 2 meters - $35.00 #46160cm x 160cm - $35.00 #47 Arte Seni Luna designs and crafts their unique lamps from natural clay and fires them in their on-site kiln. Choose from a variety of designs that reflect the traditions, styles and craftsmanship of Oaxaca. $35.00 US Dollars each with light fixture and shade - L to R #12 House, #13 Stars, #14 House, #15 Small House, #16 Pyramid & #17 Geometric Design. A uniquely-designed rose-colored Huipil cover-up to complement a blouse, sweater or dress. The open-front design and intricate floral and geometric patterns make this handcrafted Huipil a very fashionable addition to your wardrobe! $120.00 US Dollars #17 A light blue cotton vestido/dress with intricate hand-stitched orange flowers and accent lines adorn the front, neckline and bottom. A very comfortable, fashionable and and traditional dress from Tlahuitoltepec .-$185.00 US Dollars #16 A delicious and traditional dish from Oaxaca of chicken covered with a rich, smooth and Mole Negro with Rice and Tortillas! Order a Liter of Isabel's delicious Mole Negro for only $15.00 US Dollars. You will Love It!!! #1 Lamb's Wool Socks. $12.50 #31 |
@munxar the table definition for translate messages is below, the "code" column is actually 192 chars: Create Table: CREATE TABLE |
Each time you change the text, you'll get a new entry, because the code changes. It should be unique. |
So that means that all the messages that have 191+ chars are getting duplicated? |
I was able to replicate the issue using much longer text. I'll try to find the actual treshold where this happens... |
@EMAD08 You were saying you used this before without getting this behavior... did you use texts as long as the ones for the current project? |
In previous projects I didn't use text as long as with this project |
So the way to solve your problem in the mean time, use a "key" instead of the actual text in your FileUpload description and put the actual text in both languages on the Translate Messages page. |
A "key"? Sorry, I don't know so much about developing... |
Just a brief text that will be different for each photo description. You'll find this text in the "Translate Messages" page where you'll have to populate the actual description in both english and spanish. |
Ok, I'll do that in the meanwhile. Thanks! |
This is not actually a bug as we cannot make the key that much longer anyway, in my opinion. We wouldn't be able to index a "MediumText" MySQL field, so the max length would be 255 anyway. @munxar what's your take on this? |
Ok, but then why shorter text are getting duplicated too? |
Don't forget that if you make a modification to your description in the FileUpload description, this will create a NEW "key" for the Translate Messages. In this case, you need to delete the previous entry in Translate Messages and update your translations in the NEW one... this is expected behavior. |
Ok... And there's a way to delete all the messages and import an .csv with all the right messages? |
I am not sure I really understand your question. |
I mean, blank the "Translate messages" section and import a clean .csv file that I made with all the messages corrected |
@EMAD08 You should be able to export/import the messages, yes. But your problem will persist, as long as you use input fields that a user can change as your 'code' (e.g. photo.description). @mjauvin we discussed this in another thread regarding import/export and the idea was to use some sort of hashing algorithm for the code. This would reduce the code length to something predictable |
User input is really meant to be dealt with using the translatable models |
@LukeTowers there's a PR for the FileUpload that would help here. I think we should push this, even if it would be nice to have the FileUpload revamped as this might take some time. |
fixed by #470 |
I usually use this plugin with every website I create, but in the last one it started to duplicate and triplicate the messages on the "Translate messages" section, I can't figure it out
The text was updated successfully, but these errors were encountered: