Skip to content

Commit 7dbf896

Browse files
author
Kirill Noskov
committed
removed ru readme specs
1 parent 52d1c44 commit 7dbf896

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ module API. Options include:
154154
container: '#some-query-selector'; // container to attach to
155155
APIUrl: 'https://www.example.com/.netlify/functions/identity'; // Absolute url to endpoint. ONLY USE IN SPECIAL CASES!
156156
namePlaceholder: 'some-placeholder-for-Name'; // custom placeholder for name input form
157-
locale: 'en'; // language code for translations - available: en, fr, es, pt, hu, ru - default to en
157+
locale: 'en'; // language code for translations - available: en, fr, es, pt, hu - default to en
158158
}
159159
```
160160

src/translations/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as hu from "./hu.json";
55
import * as ru from "./ru.json";
66

77
export const defaultLocale = "en";
8-
const translations = { en, fr, es, hu, pt, ru };
8+
const translations = { en, fr, es, hu, pt };
99

1010
export const getTranslation = (key, locale = defaultLocale) => {
1111
const translated = translations[locale] && translations[locale][key];

src/translations/index.test.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,6 @@ describe("translations", () => {
3333
expect(getTranslation("log_in", "pt")).toEqual("Entrar");
3434
});
3535

36-
it("should return translation for 'ru' locale", () => {
37-
const { getTranslation } = require("./");
38-
expect(getTranslation("log_in", "ru")).toEqual("Войти");
39-
});
40-
4136
it("should return key for non existing translation", () => {
4237
const { getTranslation } = require("./");
4338
expect(getTranslation("unknown_key")).toEqual("unknown_key");
@@ -49,14 +44,12 @@ describe("translations", () => {
4944
jest.mock("./hu.json", () => ({}));
5045
jest.mock("./es.json", () => ({}));
5146
jest.mock("./pt.json", () => ({}));
52-
jest.mock("./ru.json", () => ({}));
5347

5448
const { getTranslation } = require("./");
5549
expect(getTranslation("log_in")).toEqual("Log in");
5650
expect(getTranslation("log_in", "fr")).toEqual("Log in");
5751
expect(getTranslation("log_in", "hu")).toEqual("Log in");
5852
expect(getTranslation("log_in", "es")).toEqual("Log in");
5953
expect(getTranslation("log_in", "pt")).toEqual("Log in");
60-
expect(getTranslation("log_in", "ru")).toEqual("Log in");
6154
});
6255
});

0 commit comments

Comments
 (0)