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

Can you add support for umijs/plus-locale #58

Open
DreamParadise opened this issue Sep 23, 2020 · 5 comments
Open

Can you add support for umijs/plus-locale #58

DreamParadise opened this issue Sep 23, 2020 · 5 comments

Comments

@DreamParadise
Copy link

Folder Structure:

src
  - locales
    - en-US
      general.ts
      login.ts
      ...
    - zh-CN
      general.ts
      login.ts
      ...
    en-US.ts
    zh-CN.ts

Usage:
in ***.tsx

const Com: FC<Props> = () => {
  const intl =  useIntl();
  return (
    <span>{intl.formatMessage({ id: 'general.dept.name' }}</span>
  );
}
@nyavro
Copy link
Owner

nyavro commented Oct 20, 2020

Could you please publish the sample content of general.ts?

@DreamParadise
Copy link
Author

Could you please publish the sample content of general.ts?

export default {
    'general.enable': 'Enable',
    'general.notEnable': 'Not Enable',
    'general.createdBy': 'Create By',
    'general.paramName': 'Parameter Name',
}

@nyavro
Copy link
Owner

nyavro commented Nov 17, 2020

Hi!
I'm having troubles configuring sample umi/plus-locale project. Could you point to some opensource project using umijs plus-locale? That would be very helpful.
Regards, Evgeniy

@nyavro
Copy link
Owner

nyavro commented Nov 18, 2020

Ok, got one project with umijs plus-locale configured. As far as I see the basic support for code-to-translation and translation-to-code navigation is already implemented out of the box of Intellij IDEA. What features missing in standard IDEA you are interested in? Code completion/code extraction/hints/missing keys highlighter?
Please let me know.
Regards

@DreamParadise
Copy link
Author

Ok, got one project with umijs plus-locale configured. As far as I see the basic support for code-to-translation and translation-to-code navigation is already implemented out of the box of Intellij IDEA. What features missing in standard IDEA you are interested in? Code completion/code extraction/hints/missing keys highlighter?
Please let me know.
Regards

This is the interface shows in IDEA
image

This is the interface shows in vs code (This is what I want)
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants