Giter Club home page Giter Club logo

Comments (3)

mhyassin avatar mhyassin commented on May 25, 2024

that is the final strings:

strings: { prefixAgo: "من", prefixFromNow: "من دلوقتي", suffixAgo: null, suffixFromNow: null, seconds: "دلوقتي حالاً",
minute: "حوالي دقيقة", twominute: "دقيقتين", lessthanorequaltenminutes: "%d دقائق", minutes: "%d دقيقة",
hour: "حوالي ساعة", twohour: "ساعتين", lessthanorequaltenhours: "حوالي %d ساعات", hours: "حوالي %d ساعة",
day: "يوم", twoday: "يومين", lessthanorequaltendays: "%d أيام", days: "%d يوم",
month: "حوالي شهر", twomonth: "شهرين", lessthanorequaltenmonths: "%d أشهر", months: "%d شهر",
year: "حوالي سنة", twoyear: "سنتين", lessthanorequaltenyears: "%d سنين", years: "%d سنة",
wordSeparator: " ", numbers: [] }

from jquery-timeago.

mhyassin avatar mhyassin commented on May 25, 2024

and variable words will be

var words = seconds < 45 && substitute($l.seconds, Math.round(seconds)) ||
seconds < 90 && substitute($l.minute, 1) ||
minutes == 2 && substitute($l.twominute, 2) ||
minutes < 10 && substitute($l.lessthanorequaltenminutes, Math.round(minutes)) ||
minutes < 45 && substitute($l.minutes, Math.round(minutes)) ||
minutes < 90 && substitute($l.hour, 1) ||

hours == 2 && substitute($l.twohour, 2) ||
hours < 10 && substitute($l.lessthanorequaltenhours, Math.round(hours)) ||
hours < 24 && substitute($l.hours, Math.round(hours)) ||
hours < 42 && substitute($l.day, 1) ||

days == 2 && substitute($l.twoday, 2) ||
days < 10 && substitute($l.lessthanorequaltendays, Math.round(days)) ||
days < 30 && substitute($l.days, Math.round(days)) ||
days < 45 && substitute($l.month, 1) ||
days < 365 && substitute($l.months, Math.round(days / 30)) ||

years == 2 && substitute($l.twoyear, 2) ||
years < 10 && substitute($l.lessthanorequaltenyears, Math.round(years)) ||
years < 1.5 && substitute($l.year, 1) ||
substitute($l.years, Math.round(years));

var separator = $l.wordSeparator === undefined ? " " : $l.wordSeparator;
return $.trim([prefix, words, suffix].join(separator));

from jquery-timeago.

rmm5t avatar rmm5t commented on May 25, 2024

There shouldn't be a need for new settings. The string settings accept anonymous functions. See the Russian example.

from jquery-timeago.

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.