Skip to content

Commit

Permalink
docs(landing): add more translations
Browse files Browse the repository at this point in the history
  • Loading branch information
qwqcode committed Sep 20, 2024
1 parent b89a186 commit 8707f4f
Show file tree
Hide file tree
Showing 12 changed files with 762 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/docs/en/guide/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Advanced operations:
- [Reverse Proxy (Caddy, Nginx, Apache)](./backend/reverse-proxy.md)
- [Self-compile (Build from the latest code)](https://github.com/ArtalkJS/Artalk/blob/master/CONTRIBUTING.md)

## Go Module
## Go Install

If you have the Golang toolchain installed, you can run the following commands to compile and install the latest version of Artalk:

Expand Down
13 changes: 7 additions & 6 deletions docs/docs/en/guide/frontend/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ We welcome PRs to help translate Artalk into multiple languages and contribute t

| Translation Content | Language File Directory | Template File |
| ------------------- | ---------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| Backend Program | [/i18n/[LANG].yml](https://github.com/ArtalkJS/Artalk/tree/master/i18n) | [zh-CN.yml](https://github.com/ArtalkJS/Artalk/blob/master/i18n/zh-CN.yml) |
| Frontend Interface | [/ui/artalk/src/i18n/[LANG].ts](https://github.com/ArtalkJS/Artalk/tree/master/ui/artalk/src/i18n) | [zh-CN.ts](https://github.com/ArtalkJS/Artalk/blob/master/ui/artalk/src/i18n/zh-CN.ts) |
| Backend Interface | [/ui/artalk-sidebar/src/i18n/[LANG].ts](https://github.com/ArtalkJS/Artalk/tree/master/ui/artalk-sidebar/src/i18n) | [zh-CN.ts](https://github.com/ArtalkJS/Artalk/blob/master/ui/artalk-sidebar/src/i18n/zh-CN.ts) |
| Configuration Files | [/conf/artalk.example.[LANG].yml](https://github.com/ArtalkJS/Artalk/tree/master/conf) | [artalk.example.zh-CN.yml](https://github.com/ArtalkJS/Artalk/blob/master/conf/artalk.example.zh-CN.yml) |
| Documentation | [/docs/[LANG]/\*\*/\*.md](https://github.com/ArtalkJS/Artalk/tree/master/docs) | [/docs/zh/\*\*/\*.md](https://github.com/ArtalkJS/Artalk/tree/master/docs) |
| Backend Program | [/i18n/[LANG].yml](https://github.com/ArtalkJS/Artalk/tree/master/i18n) | [en.yml](https://github.com/ArtalkJS/Artalk/blob/master/i18n/en.yml) |
| Frontend Interface | [/ui/artalk/src/i18n/[LANG].ts](https://github.com/ArtalkJS/Artalk/tree/master/ui/artalk/src/i18n) | [en.ts](https://github.com/ArtalkJS/Artalk/blob/master/ui/artalk/src/i18n/en.ts) |
| Backend Interface | [/ui/artalk-sidebar/src/i18n/[LANG].ts](https://github.com/ArtalkJS/Artalk/tree/master/ui/artalk-sidebar/src/i18n) | [i18n-en.ts](https://github.com/ArtalkJS/Artalk/blob/master/ui/artalk-sidebar/src/i18n-en.ts) |
| Configuration Files | [/conf/artalk.example.[LANG].yml](https://github.com/ArtalkJS/Artalk/tree/master/conf) | [artalk.example.yml](https://github.com/ArtalkJS/Artalk/blob/master/conf/artalk.example.yml) |
| Documentation | [/docs/docs/[LANG]/\*\*/\*.md](https://github.com/ArtalkJS/Artalk/tree/master/docs/docs) | [en/\*\*/\*.md](https://github.com/ArtalkJS/Artalk/tree/master/docs/docs/en) |
| Official website home page | [/docs/landing/src/i18n/[LANG].ts](https://github.com/ArtalkJS/Artalk/tree/master/docs/landing/src/i18n) | [en.ts](https://github.com/ArtalkJS/Artalk/blob/master/docs/landing/src/i18n/en.ts) |

For more details, refer to: [Development Documentation](../../develop/index.md) / [CONTRIBUTING.md](https://github.com/ArtalkJS/Artalk/blob/master/CONTRIBUTING.md#translation)

Expand Down Expand Up @@ -58,7 +59,7 @@ Artalk.init({

### Custom Frontend Locale Content

You can pass an Object type to the frontend and customize the locale content according to the keys in the [template file](https://github.com/ArtalkJS/Artalk/blob/master/ui/artalk/src/i18n/zh-CN.ts).
You can pass an Object type to the frontend and customize the locale content according to the keys in the [template file](https://github.com/ArtalkJS/Artalk/blob/master/ui/artalk/src/i18n/en.ts).

```js
Artalk.init({
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/zh/guide/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Artalk.init({
- [反向代理 (Caddy, Nginx, Apache)](./backend/reverse-proxy.md)
- [自编译 (通过最新代码构建)](../develop/contributing.md)

## Go 模块
## Go 安装

如果你已经安装了 Golang 工具链,可以运行以下命令来编译和安装最新版本的 Artalk:

Expand Down
3 changes: 2 additions & 1 deletion docs/docs/zh/guide/frontend/i18n.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ locale: zh-CN
| 前端界面 | [/ui/artalk/src/i18n/[LANG].ts](https://github.com/ArtalkJS/Artalk/tree/master/ui/artalk/src/i18n) | [zh-CN.ts](https://github.com/ArtalkJS/Artalk/blob/master/ui/artalk/src/i18n/zh-CN.ts) |
| 后台界面 | [/ui/artalk-sidebar/src/i18n/[LANG].ts](https://github.com/ArtalkJS/Artalk/blob/master/ui/artalk-sidebar/src/i18n) | [zh-CN.ts](https://github.com/ArtalkJS/Artalk/blob/master/ui/artalk-sidebar/src/i18n/zh-CN.ts) |
| 配置文件 | [/conf/artalk.example.[LANG].yml](https://github.com/ArtalkJS/Artalk/tree/master/conf) | [artalk.example.zh-CN.yml](https://github.com/ArtalkJS/Artalk/blob/master/conf/artalk.example.zh-CN.yml) |
| 说明文档 | [/docs/[LANG]/\*\*/\*.md](https://github.com/ArtalkJS/Artalk/tree/master/docs) | [/docs/\*\*/\*.md](https://github.com/ArtalkJS/Artalk/tree/master/docs) |
| 说明文档 | [/docs/docs/[LANG]/\*\*/\*.md](https://github.com/ArtalkJS/Artalk/tree/master/docs/docs) | [zh/\*\*/\*.md](https://github.com/ArtalkJS/Artalk/tree/master/docs/docs/zh) |
| 官网首页 | [/docs/landing/src/i18n/[LANG].ts](https://github.com/ArtalkJS/Artalk/tree/master/docs/landing/src/i18n) | [zh-CN.ts](https://github.com/ArtalkJS/Artalk/blob/master/docs/landing/src/i18n/zh-CN.ts) |

更多参考:[开发文档](../../develop/index.md) / [CONTRIBUTING.md](https://github.com/ArtalkJS/Artalk/blob/master/CONTRIBUTING.md#translation)

Expand Down
15 changes: 7 additions & 8 deletions docs/landing/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ const LanguageList: React.FC = () => {
const { i18n } = useTranslation()

const languages = [
{
name: 'English',
code: 'en',
},
{
name: '简体中文',
code: 'zh',
},
{ name: 'English', code: 'en' },
{ name: '简体中文', code: 'zh' },
{ name: '繁體中文', code: 'zh-TW' },
{ name: 'Français', code: 'fr' },
{ name: '日本語', code: 'ja' },
{ name: '한국어', code: 'ko' },
{ name: 'Русский', code: 'ru' },
]

const changeLanguage = (lang: string) => {
Expand Down
8 changes: 4 additions & 4 deletions docs/landing/src/components/Slogan.scss
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,13 @@
flex-direction: row;
justify-content: center;
place-items: center;
min-width: 175px;
padding: 0 18px;
height: 60px;
min-width: 140px;
padding: 0 25px;
height: 55px;
text-align: center;
border-radius: 100px;
border: 3px solid transparent;
font-size: 1.3rem;
font-size: 1rem;
font-weight: bold;
cursor: pointer;
color: var(--color-font);
Expand Down
148 changes: 148 additions & 0 deletions docs/landing/src/i18n/fr.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
import { MessageSchema } from '.'

export const fr: MessageSchema = {
home_title: 'Artalk | Système de commentaires auto-hébergé alimenté par Golang',
get_artalk: 'Obtenir Artalk',
get_artalk_link: 'https://artalk.js.org/guide/intro.html',
slogan_line_1: 'Auto-hébergé',
slogan_line_2: 'Commentaire',
slogan_line_3: 'Système',
nav_docs_link: 'https://artalk.js.org/guide/intro.html',
nav_changelog_link: 'https://github.com/ArtalkJS/Artalk/blob/master/CHANGELOG.md',
github_link: 'https://github.com/ArtalkJS/Artalk',
docs: 'Documentation',
changelog: 'Journal des modifications',
feature_slight_title: 'Léger',
feature_slight_desc_line_1: 'Programme frontal en JS natif, sans dépendance à un framework,',
feature_slight_desc_line_2:
'taille compacte, chargement rapide et réponse instantanée à chaque interaction.',
feature_swift_title: 'Rapide',
feature_swift_desc_line_1:
'Artalk est écrit en Golang, offrant rapidité, multiplateforme et facilité de déploiement.',
feature_swift_desc_line_2:
'Nous proposons également une image Docker pour un déploiement encore plus simple.',
feature_swift_self_compile: 'Vous souhaitez compiler le code vous-même ?',
deploy_bin: 'Binaire',
deploy_bin_sub: 'Déploiement de fichier',
deploy_bin_link: 'https://artalk.js.org/guide/deploy.html#fichier-binaire',
deploy_docker: 'Docker',
deploy_docker_sub: 'Déploiement par image',
deploy_docker_link: 'https://artalk.js.org/guide/deploy.html#docker',
docker_hub_link: 'https://hub.docker.com/r/artalk/artalk-go',
self_compile_guide_link: 'https://artalk.js.org/develop/contributing.html',
learn_more: 'En savoir plus',
copy: 'Copier',
copied: 'Copié !',
feature_full_title: 'Complet',
feature_full_desc_line_1:
"Artalk propose des fonctionnalités intégrées riches, tout en restant simple et prêt à l'emploi.",
feature_func_title: 'Intégration optionnelle',
feature_func_desc_line_1: 'Artalk offre de nombreuses intégrations tierces.',
feature_safe_title: 'Sécurisé',
feature_safe_desc_line_1:
'Artalk est un logiciel open-source, auto-hébergé et contrôlable en toute transparence.',
feature_safe_desc_line_2:
'Artalk inclut un outil de migration pour transférer facilement les commentaires.',
feature_safe_desc_line_3: 'Nous priorisons la sécurité et mettons à jour régulièrement.',
feature_safe_report_audit_hint: 'Vous avez trouvé un problème de sécurité ?',
feature_safe_report_audit_btn: 'Signaler maintenant',
feature_safe_report_audit_link: 'https://github.com/ArtalkJS/Artalk/issues',
func_social_login: 'Connexion via réseaux sociaux',
func_email: "Envoi d'emails",
func_captcha: 'Captcha',
func_message_pusher: 'Notifications push',
func_moderator: 'Modération de contenu',
func_emoji: 'Émojis',
func_img_upload: "Téléchargement d'images",
func_rich_text: 'Texte enrichi',
func_code_highlight: 'Surlignage de code',
func_avatar: 'Avatar utilisateur',
func_img_lightbox: "Lightbox d'image",
func_database: 'Base de données',
func_cache: 'Cache haute performance',
func_deploy: 'Déploiement',
func_os: "Système d'exploitation",
func_platform: 'Architecture de plateforme',
func_transfer_import: 'Import de commentaires',
func_email_aliyun: 'E-mail Aliyun',
func_captcha_geetest: 'Geetest',
func_message_pusher_lark: 'Lark',
func_message_pusher_dingtalk: 'DingTalk',
func_moderator_aliyun: 'Aliyun',
func_moderator_tencent: 'Tencent Cloud',
func_moderator_offline: 'Dictionnaire hors-ligne',
func_emoji_standard_format: 'Format standard',
func_emoji_owo_format: 'Format OwO',
func_img_upload_local: 'Sauvegarde locale',
func_img_upload_function: 'Fonction personnalisée',
func_avatar_function: 'Fonction personnalisée',
func_cache_internal: 'Cache intégré',
func_deploy_bin: 'Fichier binaire',
func_deploy_docker: 'Image Docker',
feature_sidebar_name: 'Barre latérale',
feature_sidebar_desc: 'Gestion rapide, navigation intuitive',
feature_social_login_name: 'Connexion via réseaux sociaux',
feature_social_login_desc: 'Connexion rapide avec un compte réseau social',
feature_email_notification_name: 'Notification par e-mail',
feature_email_notification_desc: "Plusieurs méthodes d'envoi et modèles d'e-mail",
feature_diverse_push_name: 'Notifications diverses',
feature_diverse_push_desc: 'Multiples options de notification et modèles personnalisés',
feature_site_notification_name: 'Notification sur site',
feature_site_notification_desc: 'Indicateurs, mentions dans la liste',
feature_captcha_name: 'Captcha',
feature_captcha_desc: 'Différents types de captcha et limitations de fréquence',
feature_comment_moderation_name: 'Modération des commentaires',
feature_comment_moderation_desc: 'Vérification de contenu et filtres anti-spam',
feature_image_upload_name: "Téléchargement d'images",
feature_image_upload_desc: 'Téléchargement personnalisé, support de stockage externe',
feature_markdown_name: 'Markdown',
feature_markdown_desc: 'Prise en charge du format Markdown',
feature_emoji_pack_name: "Pack d'émojis",
feature_emoji_pack_desc: 'Compatibilité OwO et intégration rapide',
feature_multi_site_name: 'Multi-sites',
feature_multi_site_desc: 'Séparation des sites et gestion centralisée',
feature_admin_name: 'Administrateur',
feature_admin_desc: 'Vérification par mot de passe et badges',
feature_page_management_name: 'Gestion des pages',
feature_page_management_desc: 'Navigation facile et raccourcis vers les titres',
feature_page_view_statistics_name: 'Statistiques de vues',
feature_page_view_statistics_desc: 'Comptage des vues de pages en toute simplicité',
feature_hierarchical_structure_name: 'Structure hiérarchique',
feature_hierarchical_structure_desc: 'Liste imbriquée, chargement infini',
feature_comment_voting_name: 'Votes sur les commentaires',
feature_comment_voting_desc: 'Votez pour ou contre un commentaire',
feature_comment_sorting_name: 'Tri des commentaires',
feature_comment_sorting_desc: 'Différentes options de tri disponibles',
feature_comment_search_name: 'Recherche de commentaires',
feature_comment_search_desc: 'Recherche rapide dans les commentaires',
feature_comment_pinning_name: 'Épinglage des commentaires',
feature_comment_pinning_desc: 'Épinglez les commentaires importants en haut',
feature_view_author_only_name: "Voir seulement l'auteur",
feature_view_author_only_desc: "Afficher uniquement les commentaires de l'auteur",
feature_comment_jump_name: 'Sauter au commentaire',
feature_comment_jump_desc: 'Accéder rapidement au commentaire cité',
feature_auto_save_name: 'Sauvegarde automatique',
feature_auto_save_desc: 'Sauvegarde automatique pour éviter la perte de contenu',
feature_ip_region_name: 'Région IP',
feature_ip_region_desc: "Affiche la région basée sur l'adresse IP de l'utilisateur",
feature_data_migration_name: 'Migration de données',
feature_data_migration_desc: 'Migration facile et sauvegarde rapide des commentaires',
feature_image_lightbox_name: "Lightbox d'image",
feature_image_lightbox_desc: "Intégration rapide de la lightbox d'image",
feature_image_lazy_load_name: "Chargement différé d'images",
feature_image_lazy_load_desc: 'Optimisez les performances avec le chargement différé',
feature_latex_name: 'Latex',
feature_latex_desc: 'Prise en charge du rendu des formules Latex',
feature_night_mode_name: 'Mode nuit',
feature_night_mode_desc: 'Basculement entre mode nuit et jour',
feature_extension_plugin_name: 'Extensions',
feature_extension_plugin_desc: 'Créez des possibilités supplémentaires grâce aux extensions',
feature_multi_language_name: 'Multilingue',
feature_multi_language_desc: 'Support multilingue',
feature_command_line_name: 'Ligne de commande',
feature_command_line_desc: 'Gestion via la ligne de commande',
feature_api_documentation_name: 'Documentation API',
feature_api_documentation_desc: 'Documentation au format OpenAPI',
feature_program_upgrade_name: 'Mise à jour du programme',
feature_program_upgrade_desc: 'Vérification des versions et mise à jour en un clic',
}
13 changes: 11 additions & 2 deletions docs/landing/src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ import LanguageDetector from 'i18next-browser-languagedetector'
import { initReactI18next } from 'react-i18next'
import { en } from './en'
import { zhCN } from './zh-CN'
import { zhTW } from './zh-TW'
import { fr } from './fr'
import { ja } from './ja'
import { ko } from './ko'
import { ru } from './ru'

export type MessageSchema = typeof en
export const DefaultNameSpace = 'translation'
Expand All @@ -13,8 +18,12 @@ const i18nConfig: InitOptions = {
en: { translation: en },
zh: { translation: zhCN },
'zh-CN': { translation: zhCN },
'zh-TW': { translation: zhCN },
'zh-HK': { translation: zhCN },
'zh-TW': { translation: zhTW },
'zh-HK': { translation: zhTW },
fr: { translation: fr },
ja: { translation: ja },
ko: { translation: ko },
ru: { translation: ru },
},
fallbackLng: 'en',

Expand Down
Loading

0 comments on commit 8707f4f

Please sign in to comment.