mirror of
https://github.com/abapGit/abapGit.git
synced 2025-05-01 12:20:51 +08:00
Master lang only - clear descriptions for clas, intf (#3388)
* Master lang only - descriptions for clas, intf * Use master language instead of logon language * sy-langu to master language - fix cus0, cus1, cus2 Co-authored-by: Lars Hvam <larshp@hotmail.com>
This commit is contained in:
parent
1ef0aa9e74
commit
b12c811159
|
@ -357,9 +357,17 @@ CLASS zcl_abapgit_object_clas IMPLEMENTATION.
|
||||||
|
|
||||||
METHOD serialize_descr.
|
METHOD serialize_descr.
|
||||||
|
|
||||||
DATA: lt_descriptions TYPE zif_abapgit_definitions=>ty_seocompotx_tt.
|
DATA: lt_descriptions TYPE zif_abapgit_definitions=>ty_seocompotx_tt,
|
||||||
|
lv_language TYPE spras.
|
||||||
|
|
||||||
|
IF io_xml->i18n_params( )-serialize_master_lang_only = abap_true.
|
||||||
|
lv_language = mv_language.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
lt_descriptions = mi_object_oriented_object_fct->read_descriptions(
|
||||||
|
iv_obejct_name = iv_clsname
|
||||||
|
iv_language = lv_language ).
|
||||||
|
|
||||||
lt_descriptions = mi_object_oriented_object_fct->read_descriptions( iv_clsname ).
|
|
||||||
IF lines( lt_descriptions ) = 0.
|
IF lines( lt_descriptions ) = 0.
|
||||||
RETURN.
|
RETURN.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
|
@ -175,7 +175,7 @@ CLASS ZCL_ABAPGIT_OBJECT_CUS0 IMPLEMENTATION.
|
||||||
ls_img_activity-header-ltime.
|
ls_img_activity-header-ltime.
|
||||||
|
|
||||||
IF io_xml->i18n_params( )-serialize_master_lang_only = abap_true.
|
IF io_xml->i18n_params( )-serialize_master_lang_only = abap_true.
|
||||||
DELETE ls_img_activity-texts WHERE spras <> sy-langu.
|
DELETE ls_img_activity-texts WHERE spras <> mv_language.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
io_xml->add( iv_name = 'CUS0'
|
io_xml->add( iv_name = 'CUS0'
|
||||||
|
|
|
@ -188,7 +188,7 @@ CLASS ZCL_ABAPGIT_OBJECT_CUS1 IMPLEMENTATION.
|
||||||
ls_customzing_activity-activity_header-luser.
|
ls_customzing_activity-activity_header-luser.
|
||||||
|
|
||||||
IF io_xml->i18n_params( )-serialize_master_lang_only = abap_true.
|
IF io_xml->i18n_params( )-serialize_master_lang_only = abap_true.
|
||||||
DELETE ls_customzing_activity-activity_title WHERE spras <> sy-langu.
|
DELETE ls_customzing_activity-activity_title WHERE spras <> mv_language.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
io_xml->add( iv_name = 'CUS1'
|
io_xml->add( iv_name = 'CUS1'
|
||||||
|
|
|
@ -164,7 +164,7 @@ CLASS ZCL_ABAPGIT_OBJECT_CUS2 IMPLEMENTATION.
|
||||||
ls_customizing_attribute-header-luser.
|
ls_customizing_attribute-header-luser.
|
||||||
|
|
||||||
IF io_xml->i18n_params( )-serialize_master_lang_only = abap_true.
|
IF io_xml->i18n_params( )-serialize_master_lang_only = abap_true.
|
||||||
DELETE ls_customizing_attribute-titles WHERE spras <> sy-langu.
|
DELETE ls_customizing_attribute-titles WHERE spras <> mv_language.
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
io_xml->add( iv_name = 'CUS2'
|
io_xml->add( iv_name = 'CUS2'
|
||||||
|
|
|
@ -33,7 +33,7 @@ ENDCLASS.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
CLASS ZCL_ABAPGIT_OBJECT_INTF IMPLEMENTATION.
|
CLASS zcl_abapgit_object_intf IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD constructor.
|
METHOD constructor.
|
||||||
|
@ -140,7 +140,8 @@ CLASS ZCL_ABAPGIT_OBJECT_INTF IMPLEMENTATION.
|
||||||
lt_descriptions TYPE zif_abapgit_definitions=>ty_seocompotx_tt,
|
lt_descriptions TYPE zif_abapgit_definitions=>ty_seocompotx_tt,
|
||||||
ls_vseointerf TYPE vseointerf,
|
ls_vseointerf TYPE vseointerf,
|
||||||
ls_clskey TYPE seoclskey,
|
ls_clskey TYPE seoclskey,
|
||||||
lt_lines TYPE tlinetab.
|
lt_lines TYPE tlinetab,
|
||||||
|
lv_language TYPE spras.
|
||||||
|
|
||||||
|
|
||||||
ls_clskey-clsname = ms_item-obj_name.
|
ls_clskey-clsname = ms_item-obj_name.
|
||||||
|
@ -168,7 +169,14 @@ CLASS ZCL_ABAPGIT_OBJECT_INTF IMPLEMENTATION.
|
||||||
ig_data = lt_lines ).
|
ig_data = lt_lines ).
|
||||||
ENDIF.
|
ENDIF.
|
||||||
|
|
||||||
lt_descriptions = mi_object_oriented_object_fct->read_descriptions( ls_clskey-clsname ).
|
IF io_xml->i18n_params( )-serialize_master_lang_only = abap_true.
|
||||||
|
lv_language = mv_language.
|
||||||
|
ENDIF.
|
||||||
|
|
||||||
|
lt_descriptions = mi_object_oriented_object_fct->read_descriptions(
|
||||||
|
iv_obejct_name = ls_clskey-clsname
|
||||||
|
iv_language = lv_language ).
|
||||||
|
|
||||||
IF lines( lt_descriptions ) > 0.
|
IF lines( lt_descriptions ) > 0.
|
||||||
io_xml->add( iv_name = 'DESCRIPTIONS'
|
io_xml->add( iv_name = 'DESCRIPTIONS'
|
||||||
ig_data = lt_descriptions ).
|
ig_data = lt_descriptions ).
|
||||||
|
|
|
@ -238,10 +238,20 @@ CLASS zcl_abapgit_oo_base IMPLEMENTATION.
|
||||||
|
|
||||||
|
|
||||||
METHOD zif_abapgit_oo_object_fnc~read_descriptions.
|
METHOD zif_abapgit_oo_object_fnc~read_descriptions.
|
||||||
|
IF iv_language IS INITIAL.
|
||||||
|
" load all languages
|
||||||
SELECT * FROM seocompotx INTO TABLE rt_descriptions
|
SELECT * FROM seocompotx INTO TABLE rt_descriptions
|
||||||
WHERE clsname = iv_obejct_name
|
WHERE clsname = iv_obejct_name
|
||||||
AND descript <> ''
|
AND descript <> ''
|
||||||
ORDER BY PRIMARY KEY. "#EC CI_SUBRC
|
ORDER BY PRIMARY KEY. "#EC CI_SUBRC
|
||||||
|
ELSE.
|
||||||
|
" load master language
|
||||||
|
SELECT * FROM seocompotx INTO TABLE rt_descriptions
|
||||||
|
WHERE clsname = iv_obejct_name
|
||||||
|
AND langu = iv_language
|
||||||
|
AND descript <> ''
|
||||||
|
ORDER BY PRIMARY KEY. "#EC CI_SUBRC
|
||||||
|
ENDIF.
|
||||||
ENDMETHOD.
|
ENDMETHOD.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,7 @@ INTERFACE zif_abapgit_oo_object_fnc PUBLIC.
|
||||||
read_descriptions
|
read_descriptions
|
||||||
IMPORTING
|
IMPORTING
|
||||||
iv_obejct_name TYPE seoclsname
|
iv_obejct_name TYPE seoclsname
|
||||||
|
iv_language TYPE spras OPTIONAL
|
||||||
RETURNING
|
RETURNING
|
||||||
VALUE(rt_descriptions) TYPE zif_abapgit_definitions=>ty_seocompotx_tt,
|
VALUE(rt_descriptions) TYPE zif_abapgit_definitions=>ty_seocompotx_tt,
|
||||||
delete
|
delete
|
||||||
|
|
Loading…
Reference in New Issue
Block a user