-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #32 from abhaykv04/dev
Add Hindi Support 🎉
- Loading branch information
Showing
13 changed files
with
167 additions
and
45 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "fifo", | ||
"version": "1.5.0", | ||
"version": "1.6.0", | ||
"private": true, | ||
"scripts": { | ||
"dev": "vite dev", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// Dependencies | ||
import type { LabelsType } from "./types"; | ||
|
||
// Constants | ||
export const LANGUAGES = ["EN", "HI"]; | ||
|
||
export const LABELS: LabelsType = { | ||
NEW: { EN: "New", HI: "नई पंक्ति बनाएँ" }, | ||
MY_QUEUES: { EN: "My Queues", HI: "मेरी पंक्तियाँ" }, | ||
NO_QUEUES_FOUND: { EN: "No Queues Found", HI: "कोई पंक्ति नहीं है" }, | ||
CREATE_NEW_QUEUE: { EN: "Create New Queue", HI: "नई पंक्ति बनाएँ" }, | ||
ENTER_QUEUE_NAME: { EN: "Enter Queue Name", HI: "पंक्ति का नाम डालें" }, | ||
ENTER_ITEM_NAME: { EN: "Enter Item Name", HI: "वस्तु का नाम डालें" }, | ||
ADD: { EN: "Add", HI: "डालें" }, | ||
ADD_COUNTER: { EN: "Add Counter", HI: "पंक्ति में गणित्र डालें" }, | ||
SAVE: { EN: "Save", HI: "सेव करें" }, | ||
REMOVE: { EN: "Remove", HI: "हटाएँ" }, | ||
DELETE_ALL: { EN: "Delete All", HI: "सारी पंक्तियाँ हटाएँ" }, | ||
SURE: { EN: "Sure?", HI: "पक्का?" }, | ||
EDIT: { EN: "Edit", HI: "एडिट" }, | ||
USE: { EN: "Use", HI: "उपयोग" }, | ||
SEND_TO_LAST: { EN: "Send to Last", HI: "अंत में भेजें" }, | ||
UNDO: { EN: "Undo", HI: "पूर्ववत करें" }, | ||
UP_NEXT: { EN: "Up Next", HI: "अगला" }, | ||
LAST_COUNT: { EN: "Last Count", HI: "पिछली संख्या" }, | ||
EDIT_ITEM_NAME: { | ||
EN: "Edit Item Name (Max 5 Characters)", | ||
HI: "वास्तु का नाम एडिट करें (अधिकतम 5 अक्षर)", | ||
}, | ||
EDIT_QUEUE: { EN: "Edit Queue", HI: "पंक्ति एडिट करें" }, | ||
DELETE: { EN: "Delete", HI: "पंक्ति हटाएँ" }, | ||
ITEM_LESS_THAN_5_ERROR: { | ||
EN: "item name must be less than 5 characters", | ||
HI: "वस्तु का नाम 5 अक्षरों से काम का होना चाहिए", | ||
}, | ||
ENTER_QUEUE_NAME_ERROR: { | ||
EN: "please enter queue name", | ||
HI: "कृपया पंक्ति का नाम डालें", | ||
}, | ||
QUEUE_LESS_THAN_10_ERROR: { | ||
EN: "queue name must be less than 10 characters", | ||
HI: "पंक्ति का नाम 10 अक्षरों से काम का होना चाहिए", | ||
}, | ||
ITEM_ATLEAST_ONE_ERROR: { | ||
EN: "please add atleast one item", | ||
HI: "कृपया कम से कम एक वस्तु डालें", | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Dependencies | ||
import { derived, writable, type Readable } from "svelte/store"; | ||
import { LABELS } from "./constants"; | ||
|
||
// Stores | ||
export const appLanguage = writable("EN"); | ||
|
||
export const labels: Readable<{ [x: string]: string }> = derived( | ||
appLanguage, | ||
($appLanguage) => | ||
Object.keys(LABELS).reduce((acc, curr) => { | ||
const labelObject = LABELS[curr]; | ||
return { | ||
...acc, | ||
[curr]: labelObject[$appLanguage as keyof typeof labelObject], | ||
}; | ||
}, {}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// Dependencies | ||
import { LABELS } from "./constants"; | ||
|
||
// Utilities | ||
export const getLabel = (labelName: string, appLanguage: string) => { | ||
const labelObject = LABELS[labelName]; | ||
const labelValue = labelObject[appLanguage as keyof typeof labelObject]; | ||
return labelValue; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
5432eb3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
fifo – ./
simplyfifo.vercel.app
fifo-git-master-abhayvats.vercel.app
fifo-abhayvats.vercel.app