We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am having trouble understanding fallback behavior of this project.
If I translate e.g. a field "name" into "name_en" and "name_de", but leave both empty. Should the value in the "name" column be displayed?
I noticed that after running the migrations all translated fields were displayed as empty in the admin. Only after running
./manage.py update_translation_fields
Were the default strings displayed. This is because all strings in "name" were copied into "name_de".
Is there a fallback setting, that would cause the content of the "name" column to be displayed if the other columns are empty?
The text was updated successfully, but these errors were encountered:
I just had the same requirement (or expected behavior) as yours, @schumannd
What I did was the following:
Just modified the last line of TranslationFieldDescriptor.__get__ to the following
TranslationFieldDescriptor.__get__
- return default + return default or instance.__dict__[self.field.name]
In my tests, it seems to be working as I expected.
Sorry, something went wrong.
No branches or pull requests
I am having trouble understanding fallback behavior of this project.
If I translate e.g. a field "name" into "name_en" and "name_de", but leave both empty. Should the value in the "name" column be displayed?
I noticed that after running the migrations all translated fields were displayed as empty in the admin. Only after running
./manage.py update_translation_fields
Were the default strings displayed. This is because all strings in "name" were copied into "name_de".
Is there a fallback setting, that would cause the content of the "name" column to be displayed if the other columns are empty?
The text was updated successfully, but these errors were encountered: