Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: provide a DefaultTheme.AlgoliaSearchOptions['locales'] template for translators #2744

Closed
nazarepiedady opened this issue Aug 19, 2024 · 4 comments · Fixed by #2758
Closed
Labels
contribution welcome 📚 docs Related to documentation changes

Comments

@nazarepiedady
Copy link
Contributor

What problem is this solving

I believe that this feature will help to better the translators' work, because this will allow serving a translation that is paring the Chinese version that goes a little beyond translating the text of buttons and interface's instructions.

Proposed solution

I think we could provide a version of the object below with English content to give a starting point for those who are dedicated to translating the documentation content:

export const zhSearch: DefaultTheme.AlgoliaSearchOptions['locales'] = {
  zh: {
    placeholder: '搜索文档',
    translations: {
      button: {
        buttonText: '搜索文档',
        buttonAriaLabel: '搜索文档',
      },
      modal: {
        searchBox: {
          resetButtonTitle: '清除查询条件',
          resetButtonAriaLabel: '清除查询条件',
          cancelButtonText: '取消',
          cancelButtonAriaLabel: '取消',
        },
        startScreen: {
          recentSearchesTitle: '搜索历史',
          noRecentSearchesText: '没有搜索历史',
          saveRecentSearchButtonTitle: '保存至搜索历史',
          removeRecentSearchButtonTitle: '从搜索历史中移除',
          favoriteSearchesTitle: '收藏',
          removeFavoriteSearchButtonTitle: '从收藏中移除',
        },
        errorScreen: {
          titleText: '无法获取结果',
          helpText: '你可能需要检查你的网络连接',
        },
        footer: {
          selectText: '选择',
          navigateText: '切换',
          closeText: '关闭',
          searchByText: '搜索供应商',
        },
        noResultsScreen: {
          noResultsText: '无法找到相关结果',
          suggestedQueryText: '你可以尝试查询',
          reportMissingResultsText: '你认为该查询应该有结果?',
          reportMissingResultsLinkText: '点击反馈',
        },
      },
    },
  },
}

Describe alternatives you've considered

I believe the solution proposed is good enough to be considered to be implemented.

@nazarepiedady
Copy link
Contributor Author

@Jinjiang, what you think about the point I raised? It is not a big thing, but I believe to be worth of consideration.

Copy link
Member

posva commented Aug 20, 2024

Feel free to add it to the contribution guidelines

@posva posva added contribution welcome 📚 docs Related to documentation changes and removed feature request labels Aug 20, 2024 — with Volta.net
@Jinjiang
Copy link
Member

Agree. I think it's a good idea to provide a template for translations.

@nazarepiedady
Copy link
Contributor Author

Feel free to add it to the contribution guidelines

Of course, I will edit the contribution guidelines soon. I just created the issue to know what you people think about this improvement for the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution welcome 📚 docs Related to documentation changes
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants