SAP / abap-file-formats

File formats that define and specify the file representation for ABAP development objects
MIT License
58 stars 56 forks source link

Language, exact field contents? #34

Closed larshp closed 2 years ago

larshp commented 3 years ago

masterLanguage is part of multiple files, and it is defined as 2 characters

but what is considered correct, and what is wrong?

In SAP all user formatted languages are 2 characters upper case, but looking at something like ISO its 2 character lower case

Suggest to make an explicit enum list of allowed values

larshp commented 3 years ago

still relevant, https://github.com/SAP/abap-file-formats/blob/main/file-formats/intf/examples/zif_aff_example.intf.json#L5

larshp commented 3 years ago

suggest following ISO standards

larshp commented 3 years ago

it's only possible for SAP to implement this issue, as the code for JSON generation is proprietary

larshp commented 3 years ago

I see this issue as an easy low hanging fruit, impacting all files in the project => ie. it should be high priority IMHO

schneidermic0 commented 3 years ago

As mentioned above all conversions in ABAP produce 2 characters upper case (e.g. ISOLA conversion exits or transformations):

I think I would prefer using ISO 639-1 using small characters.

However, I would like to check with the team how we can convert this fast in simple transformations.

schneidermic0 commented 2 years ago

We took this topic up. Unfortunately, it turned out, that ABAP uses always upper-case language codes.

Both accept lower case iso codes as input (in our case deserialisation) but produce uppercase codes as output (in our case during serialisation).

Even if I personally would prefer small characters for language codes, I think we should stick to the representation ABAP uses in other places, too.

If no one disagrees, we should specify this in our repository documentation.

larshp commented 2 years ago

suggest following ISO standards

schneidermic0 commented 2 years ago

Within the last weeks, we reiterated this topic (once more) and reached out to some more colleagues. They also suggested to use ISO-standard if the language is also used outside of ABAP systems.

Since I mentioned some ABAP functionality to do language conversions in ABAP systems. For the conversion to ISO language codes they suggested to use class CL_I18N_LANGUAGES.

We planned to take this up in our current iteration (see #280)

larshp commented 2 years ago

class CL_I18N_LANGUAGES is not released, I'd expect SAP to have released stuff to convert between internal format and ISO codes

schneidermic0 commented 2 years ago

class CL_I18N_LANGUAGES is not released, I'd expect SAP to have released stuff to convert between internal format and ISO codes

I have sent your feedback to the colleagues responsible.

larshp commented 2 years ago

I've looked through https://abapedia.org/steampunk-2111-api/ but did not find anything similar

schneidermic0 commented 2 years ago

I've looked through https://abapedia.org/steampunk-2111-api/ but did not find anything similar

Yes, there is nothing, currently. As mentioned above I sent the feedback to my colleagues. They've added it as request to their backlog.

schneidermic0 commented 2 years ago

I think we can close this issue. If I miss anything feel free to reopen it.