BoltTranslate / labels

Bolt Labels extension - Translatable labels for Bolt
https://bolt.cm/
18 stars 12 forks source link

Labels file rolling back #61

Closed Mahan-F closed 4 years ago

Mahan-F commented 6 years ago

My labels constantly reset or roll back. I looked into it to see what's causing it. On Slack Bob said that before there was a problem with 404 pages, I tried that and it seemed to be fine. The problem happened when I changed to a language which I had not yet provided any labels.

This is my labels configuration:

# Configuration file for Labels

# The array of supported languages. It's advisable to stick to two-letter language codes.
languages: [ en, fa, tr, ae ]
default: en

# Automatically add missing labels to the translation file?
add_missing: true

# Fallback to the 'default language', if the label is not defined in the selected language?
use_fallback: true

# Option to hide the backend menuitem
#show_menu: false

I am using Bolt 3.4.8 and Labels 3.1.3.

This is what currently have for the labels: Labels.json

Steps to reproduce:

When I say labels were gone I don't mean all were deleted. This is why I used the term "roll back" above, it seems to just go to a previous version or something.

This is my labels.json file after did the steps above. Labels.json

I did those steps 2 times and both times this happened.

blaues0cke commented 6 years ago

Can confirm that this issue exists

SvanteRichter commented 5 years ago

@bobdenotter Does this sound familiar to you?

peterboorsma commented 5 years ago

Same here. Bolt 3.5.7 + Labels 3.1.3 with Translate 4.1.1 The labels.json keeps rolling back to an old version. I just enabled the changelog of this installation to see if I can find out more.

bobdenotter commented 5 years ago

Is it perhaps "rolling back", because you're overwriting it from the one that comes from git?

peterboorsma commented 5 years ago

No. I don't use git with this site. I think it happens when records are being edited but not sure.

blaues0cke commented 5 years ago

This happens (in my case) when the language is switched while some entires are missing (or empty) in another language.

peterboorsma commented 5 years ago

I still don't know much about this bug but it happens when records are edited. If you need a live example I can give you access to the affected website.

Mahan-F commented 5 years ago

This happens (in my case) when the language is switched while some entires are missing (or empty) in another language.

This is exactly what happens. When I made this issue I was having this problem almost everyday where it seemed like the labels were just rolling back. This is what causes this bug.

Create a label and provide the label name and for example the label in English and leave other languages empty. If you visit the website in this other language where the label is being used, the labels will be "rolled back". I fixed this by copy and pasting English translation to all the other languages until I had the actual translations ready. So don't leave any labels empty to prevent it from happening.