Giter Site home page Giter Site logo

Comments (4)

iamsivin avatar iamsivin commented on June 16, 2024 2

@micheh Thank you for reporting the issue. We are currently working on a solution to fix the translation problem, as there is an open PR to address it. #9097
cc @vishnu-narayanan

from chatwoot.

linear avatar linear commented on June 16, 2024

PR-1056 Next available day/hour is not properly translated

from chatwoot.

vishnu-narayanan avatar vishnu-narayanan commented on June 16, 2024

@micheh Thank you for reporting this. If possible, could you share a screenshot of it? Which language are you using?

The only hard-coded string in this method would be days right. Anything else?

from chatwoot.

micheh avatar micheh commented on June 16, 2024

Hello @vishnu-narayanan, here is a screenshot:

image

I tested it with German (de), but could replicate the issue in other languages like French (fr), Italian (it) and Spanish (es).

Almost all methods in nextAvailabilityTime.js are affected.

generateRelativeTime returns an English string:

const hourRelative = generateRelativeTime(
this.dayDiff + 1,
'days',
this.languageCode
);

Line 172 returns the hard coded string on and the translated day:

return `on ${this.dayNameOfNextWorkingDay}`;

hoursAndMinutesToBack and the other methods used like exactTimeInAmPm also return hard coded strings:

hoursAndMinutesToBack() {
const { hoursLeft, minutesLeft } = this.hoursAndMinutesBackInOnline;
if (hoursLeft >= 3) {
return this.exactTimeInAmPm;
}
if (hoursLeft > 0 || minutesLeft > 0) {
return this.hoursAndMinutesLeft;
}
return 'in some time';

In the German language, the relative time should be in another place.
EN: We'll be back online tomorrow
DE: Wir werden morgen wieder online sein

from chatwoot.

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.