Solved

New language is not exported from TSF to IAM

  • 20 October 2022
  • 13 replies
  • 98 views

Userlevel 2
Badge +6

Based on a copy of the language “Nederlands”  (NL) we introduced the new language “Vlaams” (NL-BE) in TSF. The differences between “Nederlands” and “Vlaams” we translated specifically into specific Flemish words.

In TSF we added NL-BE as an additional language via "Projects | Project overview | tab Project versions | tab Application languages”.

But when exporting the application model to a script file to be able to import it in IAM on the production server, we noticed that the translations for the language NL-BE were not there.

We only found lines like:

EXEC sync_transl_full 'JP_BOUWMANAGEMENT', '6.9', 'NL', 0, 'actie', null, null, N'Actie', N'Acties', null, N'

What did I forget to do?

 

Also see: 

 

icon

Best answer by Mark Jongeling 25 October 2022, 09:10

View original

This topic has been closed for comments

13 replies

Userlevel 7
Badge +19

Hi Johan,

During Synchronization to IAM, all translations regardless of language will be synced, but I think the Flemish translations are unusable due to the absence of the language in the base table inside IAM.

Can you add the language in IAM > Advanced menu > Master data > Languages? I do think that should make it work:

Add Flemish language here

 

Userlevel 2
Badge +6

Hi Mark,

In IAM on the production server this language NL-BE (Flemish) is already added. Probably because in the exported model (SQL script file) there is this line:

EXEC sync_appl_lang 'NL-BE', 'dd-mm-yyyy', 'hh🇲🇲ss', 1, 0

But that is the only line in the exported script file that contains “NL-BE”.

Or do I have to add this language as well in IAM for TSF? Because there I only see this (via Advanced menu > Master data > Languages):

 

But there is no option to add a language here. I am a bit confused now. Any more suggestions (By the way: I have no clue why the language zh-CN - whatever that is - is there)? Thnx!

Userlevel 7
Badge +19

Ah, it appears that this is not a base table but rather a view that shows a collection of all used languages in applications. Therefore Flemish should also be visible in this screen. Which platform version are you running?

Userlevel 2
Badge +6

Hi Mark, we are stil using 2018.3.

Userlevel 7
Badge +19

Hi Mark, we are stil using 2018.3.

Ah, that version is already quite a while ago. The synchronization probably was quite different back then, I'll look into it on Monday as I don't know the solution at the moment.

Userlevel 7
Badge +19

Hi Johan,

It looks like the Synchronization back then was fully integrated in the Windows GUI and I am not able to find the code it runs to construct the Synchronization script. However, I tried with a test project and the new language does end up in IAM after syncing.

I added the language here: 

Project application language

It requires the language to exist, if not create it via the lookup:

I simply translated all objects using the Translate task:

Translations

In IAM I started to synchronize the SF model to a script:

Syncs language
Translations of Flemish

Inside IAM I see this:

BE application language listed

This should mean the language has ended up successfully inside IAM, but in your screenshot this hasn’t happened. Did my step-by-step list a step you might have skipped?

Hope this helps!

Userlevel 2
Badge +6

Hi Mark,

I followed the same steps already a while ago. The only difference is that in IAM (production server) the list of translations is empty. No (pre)filters set!

 

 

But that is logical since the generated script file that exports the model does not contain the translations. The language itself is being exported (EXEC sync_appl_lang is there), but the translations are not (EXEC sync_transl_full is NOT there).

It must be a small issue why they are not being exported. But what??? It is still not working. Any more suggestions?

 

Userlevel 7
Badge +19

Hi Johan,

Tried my best but I'm unable to see what the issue could be. For what I can see it calls the get_gui_transl_full procedure to obtain all translation data. Therefore it should also obtain the added language. Last thing I can think of is running all hotfixes available and retrying. 

For some odd reason I don't see the synced project appearing in IAM, but since this is an unsupported version I won't not be looking into this any further.

Would it be possible to upgrade to the newest version? If that is a bit quick you can also wait till we release the 2023.1 version of the platform which is scheduled to be released in the second half of Q4.

Userlevel 7
Badge +19

I wasn’t a Main administrator and therefore unable to see the data. Now it works...: 

Translations

 

Userlevel 2
Badge +6

Hi Mark,

Thank you for doing everything you could.

Upgrading to the latest version of the platform is a concideration, but that can not be done quickly.

I really need this for the short term because we are already operating on the Belgium market. After first giving me a solution to copy the language “NL” to “NL-BE” with a script (see: https://community.thinkwisesoftware.com/questions-conversations-78/how-to-copy-a-language-and-all-translations-2972), having translated all the specific words from Dutch to Flemish, you guys not really letting me down on just the last small part, right??!

Because we created the language with a script and not within TSF itself, we might have forgotten to update or insert a record in some table. Can you please ask a colleague to help you out with this?

Thnx!

Userlevel 7
Badge +19

Hi Johan,

You can try this script, execute this on your SF database. This results in a list of execute statements which you can run on your IAM database:

declare @project_id     project_id     = '' -- Your project name
, @project_vrs_id project_vrs_id = '' -- Your project version
, @platform platform = 0 -- Windows (1 = Web, 2 = Mobile)
, @appl_lang_id appl_lang_id = 'NL-BE' -- Language

declare @get_gui_transl_full table
(
appl_lang_id appl_lang_id,
type_of_object type_of_object,
transl_object_id transl_object_id,
transl_form transl,
transl_grid transl,
transl transl_large,
transl_plural transl,
tooltip_text tooltip_text,
help_text html_text
)
insert into @get_gui_transl_full
exec get_gui_transl_full @project_id, @project_vrs_id, @platform, @appl_lang_id

select concat('EXEC sync_transl_full ''', @project_id, ''', ''',
@project_vrs_id, ''', ''',
appl_lang_id, ''', ''',
type_of_object, ', ',
transl_object_id,''', ',
isnull(''''+ transl_form+ ''', ', 'null, '),
isnull(''''+ transl_grid+ ''', ', 'null, '),
isnull(''''+ transl + ''', ', 'null, '),
isnull(''''+ transl_plural + ''', ', 'null, '),
isnull(''''+ tooltip_text + ''', ', 'null, '),
isnull(''''+ help_text + '' , 'null')
)
from @get_gui_transl_full

-- Run results on your IAM database

*Note, this is only the Full translations, if you want to obtain the Nav translations, you can alter the script a little to become "EXEC sync_transl_nav...” and obtain data from "get_gui_transl_nav” procedure. Temp table structure can be the same I believe.

Userlevel 2
Badge +6

Hi Mark,

Thank you for the script. This was a solution that I was looking for.

I updated the values for the variables:

declare @project_id     project_id     = 'JP_BOUWMANAGEMENT' -- Your project name
      , @project_vrs_id project_vrs_id = '6.9' -- Your project version
      , @platform       platform       = 1 -- Windows (1 = Web, 2 = Mobile)
      , @appl_lang_id   appl_lang_id   = 'NL-BE' -- Language
 

But the strange thing is that all the results contained ‘NL’ instead of the specified ‘NL-BE’:


EXEC sync_transl_full 'JP_BOUWMANAGEMENT', '6.9', 'NL', '0, afmeldingsverzoek', null, null, 'Afmeldingsverzoek', 'Afmeldingsverzoeken', null, null


Apart from the wrong value for ‘appl_lang_id’, I think that the parameter 'type_of_object’ should be of type integer (int) so I removed the quote (‘) in front of the value. And I added a quote (‘) in front of the value for 'transl_object_id’

 

CONCLUSION:

The problems seems to be in the SP get_gui_transl_full. Since we are passing the value ‘NL-BE’ to the parameter @appl_lang_id, we are getting results for ‘NL’. I dived into the code of the SP get_gui_transl_full and found the issue.

 

/****** Object:  StoredProcedure [dbo].[get_gui_transl_full]    Script Date: 25-10-2022 10:53:18 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO


ALTER procedure [dbo].[get_gui_transl_full]
(
@project_id project_id ,
@project_vrs_id project_vrs_id ,
@platform platform ,
@appl_lang_id appl_lang_id
)
as
begin

-- Do not count affected rows for performance
SET NOCOUNT ON

-- >> TOEGEVOEGD DOOR <COLLEGA> OM NL TE LATEN WERKEN IN MOBILE GUID OVER SF
SET @appl_lang_id = 'NL'
-- <<

--control_proc_id: sf_proc_get_gui_procedures
--template_id: sf_proc_get_gui_procedures_select
--prog_object_item_id: get_gui_transl_full_select
--template_desc: Control procedure for generating all get gui procedures

select
t1.appl_lang_id,
t1.type_of_object,
t1.transl_object_id,
t1.transl_form,
t1.transl_grid,
t1.transl,
t1.transl_plural,
t1.tooltip_text,
t1.help_text
from gui_transl_full t1


--control_proc_id: sf_proc_get_gui_procedures
--template_id: sf_proc_get_gui_procedures_default_where
--prog_object_item_id: get_gui_transl_full_where
--template_desc: Control procedure for generating all get gui procedures

where t1.project_id = @project_id
and t1.project_vrs_id = @project_vrs_id
and (t1.appl_lang_id = @appl_lang_id or @appl_lang_id is null)


end
GO


 

SOLUTION:

Looking at the code I found the problem! Someone (I won't mention names) changed the code in the get_gui_transl_full by overriding the value for @appl_lang_id. Let me say it nicely: “Not so happy about that, but it is what it is.”

I removed the manually added line and tried the default sync process from TSF again and now it works!!!!


Thank you for your support. Without your code I would never ever have found the cause of this problem.

Userlevel 7
Badge +19

No problem Johan, you're welcome 😄