GithubHelp home page GithubHelp logo

Comments (8)

CuriousMagpie avatar CuriousMagpie commented on June 25, 2024 1

Absolutely, @umbrella-h!

from habitica.

CuriousMagpie avatar CuriousMagpie commented on June 25, 2024 1

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.

yassine-bouassida avatar yassine-bouassida commented on June 25, 2024

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.

CuriousMagpie avatar CuriousMagpie commented on June 25, 2024

@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.

yassine-bouassida avatar yassine-bouassida commented on June 25, 2024

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.

CuriousMagpie avatar CuriousMagpie commented on June 25, 2024

@yassine-bouassida Thanks for letting us know, and for doing all that investigatory work--it is very much appreciated on our part!

from habitica.

umbrella-h avatar umbrella-h commented on June 25, 2024

@CuriousMagpie May I take a stab at this?

from habitica.

umbrella-h avatar umbrella-h commented on June 25, 2024

Findings

While delving into the codebase, I discovered the following:

  1. 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
  2. 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

  1. Submitted a PR to fix the FAQ translation problem; please review #15079 for details.
  2. Verified that the /api/v4/faq GET request is sent with headers x-api-user and x-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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.