Code Monkey home page Code Monkey logo

Comments (9)

imkarimkarim avatar imkarimkarim commented on September 17, 2024 1

Hi ✋ i would like to help! i have experience working with node and express and having some time with basic python. i think I can do translation if you show me an example

from backend.

sbabashahi avatar sbabashahi commented on September 17, 2024 1

Front has his/her messages too, but they need to consume ours

from backend.

sbabashahi avatar sbabashahi commented on September 17, 2024

Hello :), you could read this https://docs.djangoproject.com/en/2.1/topics/i18n/translation/
long story short you need to add all messages to special translation function(I added most of them, just check it if there is any message left outside of translation)
then you makemessages from django , translate them to persian in .po file (be aware of configs we need)
I think it would a good practice to get the language of client from accept language parameter in http header request

from backend.

imkarimkarim avatar imkarimkarim commented on September 17, 2024

sorry for taking so long...
but i was busy with the subject, I played around a little bit with Django, pip, and virtualenv and now I'm a whole new person in the python subject...
but I had an issue with installing pandas 0.24.1 so I let the pip install the last version of pandas by removing the pandas version from requirements.txt(now I have pandas 1.2.4). it's ok to do that? i should get back to the main requirments.txt when I'm committing my code?

from backend.

sbabashahi avatar sbabashahi commented on September 17, 2024

As I know pandas is not related to translation, and in committing section you just need to add .po file and configs related files to translation in your commit.
And your issue with pandas version, I think it's about python version. I started project with python 3.5 or 3.6 so it may cause version conflict on other python versions.

from backend.

imkarimkarim avatar imkarimkarim commented on September 17, 2024

ok that's fine. i'll first work on the translation and after that will get on reading settings from the client http header...

from backend.

imkarimkarim avatar imkarimkarim commented on September 17, 2024

@sbabashahi
I know I'm bothering you. sorry. really sorry for that. i promise it's the last question... :))
(also i created the translation PR)
question: why we need translation or even messaging in back-end is this about API stuff? and messages I had translated don't have any work with front-end right?

from backend.

sbabashahi avatar sbabashahi commented on September 17, 2024

:)) don't be sorry bro, one point of contributing in opensource is to learn from each other
we have a message in code but we may have customers from multi language and we need to represent message in the language of our customers, so we need to translate, and frontend just need to say to our api which language our customer need

from backend.

imkarimkarim avatar imkarimkarim commented on September 17, 2024

❤️ 💛 i really appreciate your kindness. means a lot.
but as i checked front-end already showing other messages for example on the login screen( کلمه عبور اجباری است. ) and i don't this message is coming from back-end code... is it?

from backend.

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.