Apisix-dashboard: Proposal: i18n

Created on 23 Jul 2020  路  3Comments  路  Source: apache/apisix-dashboard

@TikWind We need a proposal to make our i18n cleaner and reasonable.

proposal

Most helpful comment

Hi, I have a proposal the key can be like this : [basicModule].[moduleName].[elementName].[...desc]

  1. basic keys (the first tow levels) divide according to the directory structure:
    eg: app.pwa, page.consumer, component.actionBar

  2. sub keys divide according to element +description
    eg: app.pwa.message.offline, component.actionBar.button.nextStep
    If the the text is the part of a element, we can use [elementName.props]
    eg: page.consumer.proTable.columns.username

  3. common texts, we should not repeat in other part, we can divide them to component.global.xxx
    eg: component.global.button.okText, component.global.status.loading and so on

All 3 comments

  1. Please take a look at how WordPress does;
  2. We need a good design on how the sub key is grouped to a key;

Hi, I have a proposal the key can be like this : [basicModule].[moduleName].[elementName].[...desc]

  1. basic keys (the first tow levels) divide according to the directory structure:
    eg: app.pwa, page.consumer, component.actionBar

  2. sub keys divide according to element +description
    eg: app.pwa.message.offline, component.actionBar.button.nextStep
    If the the text is the part of a element, we can use [elementName.props]
    eg: page.consumer.proTable.columns.username

  3. common texts, we should not repeat in other part, we can divide them to component.global.xxx
    eg: component.global.button.okText, component.global.status.loading and so on

Agree +1

Was this page helpful?
0 / 5 - 0 ratings