Comments (8)
Absolutely, @umbrella-h!
from habitica.
Thanks so much for your work here, @umbrella-h! Your PR has been merged, so I'm going to go ahead and close this.
from habitica.
Hey @CuriousMagpie ,
I noticed the issue with the FAQ page not displaying properly in different languages and was able to replicate the bug myself. I'd be happy to take a look at it and work on a fix. If you have any suggestions or advice, please let me know. I'm excited to contribute to the project and help resolve this issue.
from habitica.
@yassine-bouassida It's all yours and thank you so much! I wish I had some advice; we have an open issue to refactor the FAQ because of unnecessary complexity when needing to add/remove questions and looking at that issue and the referenced files may be helpful to trace the source of the bug.
from habitica.
Hello, I would like to inform you that I am currently unable to continue working on this issue since I have been unsuccessful in setting up Habitica locally. Rather than keeping the issue blocked while I deal with the setup, I believe it would be best to proceed with a handover. First and foremost, I have confirmed that this issue only applies to the FAQ page, as I have checked all the other pages and they are functioning properly. Specifically, on the FAQ page, only the questions and answers are not being translated. However, the title and H1 tag, "frequentlyAskedQuestions," are being translated correctly.
I have a couple of suggestions to address this issue. Firstly, it would be worth checking if the file "website\client\src\components\static\faq.vue" is properly handling the FAQ line 99. Secondly, adding some logs in the file "website\common\script\content\faq.js" could provide additional insights, even though everything appears to be fine there. Lastly, I have verified that the FAQ JSON file in the locales directory is in good condition.
Please let me know if there is anything else I can assist you with.
from habitica.
@yassine-bouassida Thanks for letting us know, and for doing all that investigatory work--it is very much appreciated on our part!
from habitica.
@CuriousMagpie May I take a stab at this?
from habitica.
Findings
While delving into the codebase, I discovered the following:
-
The query parameter
language
is necessary for the FAQ API to respond in the language configured by the user.- a.
/api/v4/faq GET
- b. File paths in the codebase:
- i.
website/client/src/store/actions/faq.js
- ii.
website/server/controllers/api-v4/faq.js
- i.
- a.
-
The comments in
website/server/controllers/api-v4/faq.js
lines 43-52 state:If the authenticated user makes the request, the content will return with the user's configured language.
Actions
- Submitted a PR to fix the FAQ translation problem; please review #15079 for details.
- Verified that the
/api/v4/faq GET
request is sent with headersx-api-user
andx-api-key
(in Firefox browser network tool). If this constitutes an 'authenticated user', I'm curious about the behavior implied by the comment description.
I sincerely apologize for the delayed response!!! Unfortunately, this issue got buried in my tasks until I started my year-end review. 🙇🏻♀️🙇🏻♀️🙇🏻♀️
from habitica.
Related Issues (20)
- Bug Report: Request to Update Twitter Icon to X - HACKTOBERFEST HOT 3
- User with stale data in preferences.tasks.mirrorGroupTasks cannot set preference for new group
- "Show Bailey" option isn't available anymore HOT 2
- How to solve JavaScript heap out of memory? HOT 2
- why so many outdated dependencies? HOT 1
- Why not update the node version?
- Habitica CalDav Sync? HOT 1
- Lack of Security file
- Sorting options in party member list fail during use of transformation item HOT 6
- 'habitica' should be listed in the project's dependencies. HOT 1
- BUG: No Checklists in To-Do's on Challenges HOT 5
- Need more feminine hair options!!!!! HOT 2
- How to know which version I'm running locally? HOT 2
- Need a Desktop app for tracking progress, synced with mobile apps HOT 2
- Need a notice with daily on! HOT 2
- Feature requirement: calendar view HOT 2
- Mongo error on startup HOT 4
- Docker compose fails to build at step 5 HOT 8
- Item purchased at Seasonal Shop gone HOT 1
- No positive integration tests HOT 1
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 habitica.