zowe / sample-spring-boot-api-service

Zowe REST API service SDK and sample API service that integrates with Zowe API Mediation Layer
Other
26 stars 18 forks source link

i18n for REST APIs and error messages #68

Closed plavjanik closed 4 years ago

plavjanik commented 4 years ago

This a first pull request for #39.

The documentation and instructions are in https://github.com/zowe/sample-spring-boot-api-service/pull/68/files?short_path=d9af631#diff-d9af6310659c7ac8fee1baf3ab693bd1.

The Swagger/Springfox localization is not in this PR and it will be delivered in another PR. This one is over 700 lines now which a high number already.

The Czech localization is not complete and it is not the goal - the purpose is only for testing, not to provide a complete localization.

I realized that some things in the original error messages functionality from the old SDK could be done nicer (e.g. use ResourceBundles, or same formatting using curly braces {} as the Spring instead of C-style) but I tried to preserve the existing API and messages.yml format and just add new functionality on top of it so existing users are not affected.

Suggestions:

plavjanik commented 4 years ago

image

What needs to be done for Czech accented characters on the mainframe:

plavjanik commented 4 years ago

Codepage conversion can be difficult in z/OS UNIX without JZOS so there is -Dorg.zowe.commons.logging.stripAccents=true option to remove such characters.

image