Comments (3)
The reason that caused this issue is quite fun. Most of the "real world" languages use some funny symbols. Romanian guys put strange things on top of their characters, some nations decided to go right to left, the nation I'm from decided that latin symbols are overrated so they introduced their own and so on.
But what is the special thing in the french is the question is here? How comes that this issue is available only when using french? Well, they use apostrophes. "User data" in french is "Données d'utilisateur". And this translation is put into:
customDataEditor = uiElement.map_list('{{ couch_user.user_id }}', '{% trans 'User Data' %}');
There are single quotes around the translation of "User Data". So the apostrophe in "Données d'utilisateur" creates syntax error in the javascript. Since the js on the page is now broken, the form is being sent directly by the browser instead of as an asynchronous call (that expected json).
So it's up to you to decide how to fix the issue:
- Easy way: Just put double quotes there. This particular issue is solved.
- We could assume that this is not the only place where these apostrophes make things works. How about fixing them all?
If it's up to me, I would go with plan number 2. But that's up to you to decide. Are you okay with the idea of completely forbidding single quotes around trans
just because of the french?
P.S.: Almost forgot. @dimagiupdate, ping :)
from commcare-hq.
wow, thanks for the investigation @vladimiroff! i think both 1 and 2 are good answers (1 now, 2 as a best practice moving forward). definitely accepting fixes for either :) @dimagiupdate
from commcare-hq.
👍 great answer
from commcare-hq.
Related Issues (20)
- [CEP] runtime configurable settings HOT 4
- [CEP] "Single-use" data links HOT 11
- API Endpoints - Add Lookup Table to App Structure API
- [CEP] Cache formplayer's validate_form's result on HQ to improve App Preview Refreshes HOT 5
- [CEP] Table partitioning for remote API logs HOT 1
- [CEP] Allow filtering by privileges on Exchange HOT 4
- [CEP] Allow deprecating unused case properties HOT 1
- [CEP] Generic HQ auditing model HOT 8
- [CEP] expanded parent xpath filtering for case search HOT 1
- [CEP] The use of type hints HOT 33
- [CEP] CommCare Query Language for Case Search HOT 12
- [CEP] date_add function for case search HOT 9
- [CEP] Case Search Query support for creating calendar based dates HOT 4
- [CEP] Custom repeater URLs with UCR expressions HOT 2
- [CEP] System Forms Metadata Standardization HOT 6
- HELPME: Refactor problematic methods
- [CEP] Supporting domains without privilege while GAing feature-flags to paid privileges HOT 26
- [CEP] Do not preindex_everything on every deploy HOT 7
- Error building commcarehq_incl to run HQ in Docker
- Blobdb error bug after restore on Ubuntu 22.04
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from commcare-hq.