Hi, and sorry if this has been covered here but I could not find anything similar:
I have the following xml structure, where each translatable element is unique. Is it possible to create a generic data element rule for this? The following does not work: //*
<Localization> <Core> <ParameterBrowser TranslationToolHeader="ParameterBrowser"> <ViewModel> <ExportParametersFile><![CDATA[Export parameters]]></ExportParametersFile> <ExportCompleted><![CDATA[Export completed successfully]]></ExportCompleted> <ParameterFile><![CDATA[Parameters]]></ParameterFile> <DriveUserParameters><![CDATA[Parameters]]></DriveUserParameters> <DriveStudioParameters><![CDATA[DriveStudio parameters]]></DriveStudioParameters> <DriveWindowParameters><![CDATA[DriveWindow parameters]]></DriveWindowParameters> <ParametersZipFile>Parameters backup file</ParametersZipFile> <PleaseWaitFilteringParameters>Reading parameters from drive...Please wait.</PleaseWaitFilteringParameters> <PleaseWaitSavingParameters>Saving parameters...Please wait.</PleaseWaitSavingParameters> <PleaseWaitExpandingParameters>Expanding parameters...Please wait.</PleaseWaitExpandingParameters> <PleaseWaitRestoringParameters>Restoring parameters...Please wait.</PleaseWaitRestoringParameters> <Loading>Loading...</Loading> <MonitoringDynamicParameterChange>Dynamic parameter change, monitoring stopped!</MonitoringDynamicParameterChange> <NoDrivesFound>No drives found.</NoDrivesFound> </ViewModel> </ParameterBrowser> </Core></Localization>
We have tried to instruct the customer to use more localization friendly structure but they have created their own tool that handles this, and they are not that anxious to modify the tool. The simplest modification would be perhaps to add new Text element, and put the current element name as ID attribute, and I will suggest this, but I would be glad to know if there is a way to handle these unique element names in Passolo data element.
You already had the right idea to convince the client to change this localization un-friendly format. In SDL Passolo you must name each element that must be localized.
When the XML parser was developed we consulted the book from Yves Savourel: XML Internationalization and Localization that gives around 10 best practice advices on how to create localization friendly XML structures. One of the advices was Don’t use infinite naming schemes.
As an LSP you can’t always convince your clients. Some years ago a created 2 small XSLT scripts that converts source files into what you already described (ID as an attribute) and back into the original format after the translated file was generated. Someting that can be done easily by your localization engineers.
Thanks Achim, I think I have discussed this same issue some years ago with my colleague but have forgotten what was the result then. Do you see any issues with using text filter with this type of structure?
I remember using the text file parser as a solution for such XML structures in the past. The tricky part creating the rule is to just extract the elements within <ViewModel> and not the parent elements.