Reading Binary Resources with Passolo Export Addin

I am using Passolo Pro 2018 and I am writing an export Addin. I have an MFC project build with VS2017 and it contains a custom binary resource “SYMBOLIC_RESOURCE_IDS”. If I enable Extract other binary resources on the project in Passolo my export Addin sees the resource and could process the data. The problem is when I enable that project setting it also make binary resources that I do not want to see visible like PNG and AFX_DIALOG_LAYOUT.

  1. Is there a way to have my export Addin see only the custom binary resource I want without making the others visible?
  2. Is it possible to enable the project setting in the SDK (Export other binary resources) read the custom binary resource then disable the project setting?
  3. Do I need to also write a parser Adding to accomplish this? I would rather not have to write a parser Addin

Below is a scree shot of the project setting and resources in Passolo

Screenshot of Passolo Pro 2018 with an open dialog box for project settings showing options for binary resource extraction.

The first 3 (PNG, AFX_DIALOG_LAYOUT,SYMBOLIC_RESOURCE_IDS) .  resources show once the setting is enabled I only want SYMBOLIC_RESOURCE_IDS

Screenshot of Passolo Pro 2018 resource list with PNG, AFX_DIALOG_LAYOUT, and SYMBOLIC_RESOURCE_IDS visible in the project.



Generated Image Alt-Text
[edited by: RWS Community AI at 12:14 PM (GMT 0) on 14 Nov 2024]
  • First I need to clarify some terms. SDL Passolo Export Add-ins implement the SDK functions PAIFN_GetExpImpData() and PAIFN_GetExportWriter() and are developed to export data from Passolo translation lists into files that can be exchanged with translators. So nothing that is related to parse user defined resources in executables.

    As mentioned you are localizing MFC application using the Win32 parser. Developers sometimes introduce user defined resources. The naming is arbitrary, in your case SYMBOLIC_RESOURCE_IDS. If I understand it correctly the content is binary and you need to localize this content. There are 2 possible solution approaches:

    1: Convince your developers to move from binary content to text or XML content

    SDL Passolo supports cascaded parsing. That means that the EXE or DLL file is parsed using the Win32 parser. In case of unknown resources (not Menu, Dialog, StringTable, etc.) nothing is extracted. Using some configuration settings in the project users are able to cascade unknown resources to other parsers like the HTML, XML and Text parser. While the file is still parsed with the Win32 parser some of the resources will be handled with i.e. the Text parser to extract  the localizable content. This will reduce your effort to solve the problem as the configuration will just take an hour.

    2: Implement a Custom Resource Add-In

    Instead of an Export Add-In you have to develop a Custom Resource Add-in that implements the SDK functions PAIFN_RscCheckType() and the PAIFN_RscScan(). This will allows you to selectively just handle the SYMBOLIC_RESOURCE_IDS resource type, parse its resources and convert its content into translatable text and insert these string entries into the Passolo project for translation. Effort is much higher but will also allow to implement user defined visualization if necessary using the PAIFN_CreateCustomControls() function.

    Not the solution but at least 2 possible methods to go forward.