Skip to content

Commit b81461a

Browse files
Russian translation: (vercel#172)
* Russian transaltion: - Added russian localization - Added translation for Features from index page (components/features.js) with fallback to English - Small typo fixes found during translation * Added SVGs translation option (#2) - Contributers now can easily translate SVGs by just passing path string - Moved all hard-coded SVGs from pages to components/diagrams/ - If no 'translation' is provided it fallbacks to default locale (en-US)
1 parent 4ce21ed commit b81461a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2852
-350
lines changed

README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ And visit `localhost:3000` to preview your changes.
1515

1616
- https://github.com/vercel/swr-site/graphs/contributors
1717
- Simplified Chinese translation done by Fang Lu ([@huzhengen](https://github.com/huzhengen))
18-
- Spanish translation done by Markoz Peña ([@markozxuu](https://twitter.com/markozxuu))
18+
- Spanish translation done by Markoz Peña ([@markozxuu](https://twitter.com/markozxuu))
1919
- Japanese translation done by uttk ([@uttk](https://github.com/uttk)), Tomohiro SHIOYA ([@shioyang](https://github.com/shioyang))
2020
- Korean translation done by SeulGi Choi ([@cs09g](https://github.com/cs09g))
21+
- Russian translation done by Valentin Politov ([@valentinpolitov](https://github.com/valentinpolitov))

components/diagrams/cache.js

+38-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

components/diagrams/drawer.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import { useRouter } from "next/router";
2+
3+
export const draw = (paths = {}, name = "") => {
4+
const { locale, defaultLocale } = useRouter();
5+
6+
if (!paths.hasOwnProperty(defaultLocale)) {
7+
throw new Error(
8+
`Please provide '${defaultLocale}' locale inside '${paths}'.`
9+
);
10+
}
11+
12+
if (
13+
typeof paths[locale] === "string" &&
14+
typeof paths[defaultLocale] === "string"
15+
) {
16+
return paths[locale] || paths[defaultLocale];
17+
}
18+
19+
return paths[locale]?.[name] || paths[defaultLocale][name];
20+
};

components/diagrams/infinite.js

+38
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)