Support forum of the software localization tool Sisulizer


.NET, Delphi, ... - Sisulizer Localization Tool Support Home

Get in contact with the makers of Sisulizer.
Our forum is open for all questions around Sisulizer from customers and prospects.
Don't hesitate to register and ask. The Sisulizer team will answer ASAP.

Search     Help Home Sisulizer Website Download
Search by username
Not logged in - Login | Register 

 Moderated by: Sisusupport, Renate.Reinartz, Markus.Kreisel, Ilkka.Salmenius
New Topic Reply Printer Friendly
Continua + FinalBuilder + Sisulizer + Multiple branches - Usage - Three simple steps to localize - Technical Support (You need to be registered at the forum to write) - .NET, Delphi, ... - Sisulizer Localization Tool Support
AuthorPost
 Posted: Thu Oct 10th, 2019 11:34 am
PM Private Upload Quote Reply
LarsFosdal
Member
 

Joined: Mon Sep 25th, 2017
Location: Norway
Posts: 21
Status: 
Offline
We use Continua and Finalbuilder on a build server.

We have a few .exe files that we want to translate and we currently work with three branches for development: trunk, pilot and live.

This means that the source paths and output paths differ between the project branches.

What is the best way to configure / execute the Sisulizer translations projects in this context?

Since the file paths seem to be embedded in the .slp file, this seems to be difficult - or have I missed something?

Back To Top PM Private Upload Quote Reply

 Posted: Thu Oct 10th, 2019 11:43 am
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3300
Status: 
Offline
Hi,

In case you have not found it:

https://www.the-localization-tool.com/category/how-to/slmake/

With the info in that you learn how to create projects on the fly, import translations etc. This should help.

If that isn`t enought you can also alter the slp file. Since it is based on XML you have all possibilities in case the regular command set limits you too much.

Hope this helps

Markus



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Thu Oct 10th, 2019 03:26 pm
PM Private Upload Quote Reply
LarsFosdal
Member
 

Joined: Mon Sep 25th, 2017
Location: Norway
Posts: 21
Status: 
Offline
Hi, Markus!
Could you exemplify in greated detail how this would be done?

Let's say I've built D:\Build\Executables\Pilot\MyApp.exe
and I have a translation file C:\Source\Pilot\Sisu\MyAppTranslations.slp that covers what MyApp contains and more.

What would be the sequence of slmake commands and arguments to create a project on the fly, import the translations, and apply them to the .exe file?

Back To Top PM Private Upload Quote Reply

 Posted: Thu Oct 10th, 2019 03:27 pm
PM Private Upload Quote Reply
LarsFosdal
Member
 

Joined: Mon Sep 25th, 2017
Location: Norway
Posts: 21
Status: 
Offline
Also - if I want to add another step that will scan for new forms / strings that needs translation - when would be the appropriate time to do that?

Back To Top PM Private Upload Quote Reply

 Posted: Thu Oct 10th, 2019 07:32 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3300
Status: 
Offline
>>Also - if I want to add another step that will scan for new forms / strings that needs >>translation - when would be the appropriate time to do that?
I recommend to do that before you create new translation packages. In general you can do that at any time.

Keep one thing in mind:

If you change the context in your project it is a good time to scan for changes and re-use your translations by value.
If you change you original strings (e.g. because of typos in the original)  in your project it is also a good idea to do a scan for changes. Sisulizer then will re-use translations by context.
It is a bad idea to correct typos in your orginal strings and change the context at the same time (e.g. change IDs). If you then use scan for changes the link between original and translation can't be found by value and can't be found by context.

Hope this helps
Markus



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Thu Oct 10th, 2019 07:43 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3300
Status: 
Offline
Hi,
I've looked deeper into it.

https://www.the-localization-tool.com/using-of-slmake-tool-create-task/
The

-output:ā€Sā€ ā€“ S is an output directory. Value is not saved.

parameter should.
The name create is a bit missleading. It doesn't create a .slp but creates the localized binaries.
A new slp is created using
https://www.the-localization-tool.com/using-of-slmake-tool-add-task/

Markus




____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

 Posted: Fri Oct 11th, 2019 12:00 pm
PM Private Upload Quote Reply
LarsFosdal
Member
 

Joined: Mon Sep 25th, 2017
Location: Norway
Posts: 21
Status: 
Offline
I ended up with a PowerShell script, which I run from Continua. Running it manually would be something like this:
MakeTranslatedExeFiles.ps1 -path D:\temp\Pilot\executable -files MyApp.exe -slpfile C:\build\src\Pilot\sisu\MyTranslations.slp


I add my executable to a temporary .slp file,
I then import the shared Translations.slp file,
and finally, I create the translated file.

Do you see any omissions or pitfalls in the parameterization?


Powershell src (Your forum ate the white space :P)
<#
.SYNOPSIS
Run Sisulizer slmake for translation
.DESCRIPTION
Uses one common .slp file to translate the executable
.PARAMETER Path
Location of executable files
.PARAMETER FileNames
Name(s) of executable file(s)
.PARAMETER slpfile
Name of slp file
.EXAMPLE
MakeTranslatedExeFiles -Path C:\Build\Executables\ -FileNames SomeFile.exe, SomeOtherFile.exe -slpfile C:\SRC\Sisu\Translations.slp
#>
[CmdletBinding()]
param (
[Parameter(Mandatory=$True)]
[String]$Path,
[Parameter(Mandatory=$True)]
[Alias('files')]
[String[]]$FileNames,
[Parameter(Mandatory=$True)]
[Alias('slp')]
[String]$slpfile
)

$lang = 'en'
$slmake = 'c:\Program Files (x86)\Sisulizer 4\slmake.exe'
$patchedslpfile = $path + '\PatchedTranslations.slp'

#paths that needs to be patched in original .slp file
# \source\name
$patch1 = "..\..\Build\PSD_bin\Win32\Executables\Development\"
# \source\outputfile
$patch2 = "..\..\..\..\..\Executables\Development"

if (test-path $slmake) {

# Patch paths in .slp file
$con = Get-Content -encoding UTF8 $slpfile
$con | % { $_.Replace($patch1, "$path") } | % { $_.Replace($patch2, "$path") } | Set-Content -encoding UTF8 $patchedslpfile

foreach($file in $FileNames) {
$Executable = Join-Path $Path $file

if (test-path $Executable) {
Write-Host "Translating $Executable..."
$tmp = New-TemporaryFile
$tmpslp = $tmp.FullName+'.slp'

& $slmake add -noimport -lang:$lang $Executable -type:delphi $tmpslp -outitem:0 -e
& $slmake import $patchedslpfile $tmpslp
& $slmake create $tmpslp

#remove temp .slp files
$wildcard = $tmp.Name+'.*'
remove-item -path $env:TEMP\* -filter $wildcard
}
else {
Throw "$Executable does not exist!"
}
}

#remove temp patched slp file
remove-item $patchedslpfile

} else {
Throw "$slmake does not exist!"
}

Last edited on Mon Oct 14th, 2019 10:29 am by LarsFosdal

Back To Top PM Private Upload Quote Reply

 Posted: Fri Oct 11th, 2019 01:45 pm
PM Private Upload Quote Reply
LarsFosdal
Member
 

Joined: Mon Sep 25th, 2017
Location: Norway
Posts: 21
Status: 
Offline
But - I have a suspicion - the import doesn't really help, since the actual .exe path does not match the path of the .exe in the MyTranslations.slp

Does this mean I have to manipulate all these paths in XML format myself?

Loading file "D:\temp\lars\sisu\MyTanslations.slp"
Importing data
Target project does not contain "..\..\Build\PSD_bin\Win32\Executables\Development\MyApp.exe.Bitmaps" node. The node was not imported. Use Sisulizer.exe to import the node.
Target project does not contain "..\..\Build\PSD_bin\Win32\Executables\Development\MyApp.exe.Cursors" node. The node was not imported. Use Sisulizer.exe to import the node.
...

Back To Top PM Private Upload Quote Reply

 Posted: Sat Oct 12th, 2019 03:23 am
PM Private Upload Quote Reply
santra
Member
 

Joined: Thu Jun 2nd, 2016
Location:  
Posts: 6
Status: 
Offline
LarsFosdal wrote:
What is the best way to configure / execute the Sisulizer translations projects in this context?


Create a project that contains one source. Pick one of the EXE. For example, live. Then right click the source in the project tree and choose Properties. Select Platform files sheet. Now add the remaining EXE as platform files. See the screenshot. Here I have 32-bit EXE as source and 64-bit EXE as platforms but platforms can also be used in a situation like yours.

Next time Sisulizer scan the project it scan the source and the platform files. If platform files contain resources that the source does not then those will also be added to the project. So the resources in the project are an union of source and platform files.

When Sisulizer builds it builds output files for source and then for each platform files.

Attachment: Platforms.png (Downloaded 7 times)

Back To Top PM Private Upload Quote Reply

 Posted: Mon Oct 14th, 2019 08:25 am
PM Private Upload Quote Reply
LarsFosdal
Member
 

Joined: Mon Sep 25th, 2017
Location: Norway
Posts: 21
Status: 
Offline
The problem still is that Continua and FinalBuilder will execute builds in parallell so that one or more of the three executables may not all exist at the same point in time that Sisulizer is doing its builds.

It would have been nice to have a path replace option for SLMake that would take a specific path in the import .slp and replace it with the option path provided to match the path of the .exe we are trying to apply the translation to.

Back To Top PM Private Upload Quote Reply

 Posted: Mon Oct 14th, 2019 10:11 am
PM Private Upload Quote Reply
LarsFosdal
Member
 

Joined: Mon Sep 25th, 2017
Location: Norway
Posts: 21
Status: 
Offline
Ended up with this little brute force gem in PowerShell
$con = Get-Content -encoding UTF8 $slpfile
$con | % { $_.Replace("SomeStaticPathUsedBySLPImport\", "$path") } | % { $_.Replace("AnotherStaticPathUsedBySLPImport\", "$path") } | Set-Content -encoding UTF8 $patchedslpfile

Back To Top PM Private Upload Quote Reply

 Posted: Tue Oct 15th, 2019 04:06 am
PM Private Upload Quote Reply
santra
Member
 

Joined: Thu Jun 2nd, 2016
Location:  
Posts: 6
Status: 
Offline
Source file names in .spl are releative. On your build server you can copy the .slp on three different locations where each locates in a directory that matches the relative path to the EXE. This way you don't have to modify the .slp file.

Last edited on Tue Oct 15th, 2019 04:06 am by santra

Back To Top PM Private Upload Quote Reply

 Posted: Wed Oct 16th, 2019 12:00 pm
PM Private Upload Quote Reply
LarsFosdal
Member
 

Joined: Mon Sep 25th, 2017
Location: Norway
Posts: 21
Status: 
Offline
santra wrote:
Source file names in .spl are releative. On your build server you can copy the .slp on three different locations where each locates in a directory that matches the relative path to the EXE. This way you don't have to modify the .slp file.

Good suggestion, but the guy updating the .slp fil is actually using a different path than the build server paths.

Also - why is this forum eating all the back-slashes?

Back To Top PM Private Upload Quote Reply

 Posted: Wed Oct 16th, 2019 12:33 pm
PM Private Upload Quote Reply
Markus.Kreisel
Administrator


Joined: Sat Apr 8th, 2006
Location: Monschau, Germany
Posts: 3300
Status: 
Offline
Use
code tags to protect text with slashes \ or tags
. Its the curly brackets button.

Markus



____________________
http://www.sisulizer.com - Three simple steps to localize
Back To Top PM Private Upload Quote Reply

Current time is 04:52 pm  
.NET, Delphi, ... - Sisulizer Localization Tool Support > Technical Support (You need to be registered at the forum to write) > Usage - Three simple steps to localize > Continua + FinalBuilder + Sisulizer + Multiple branches



WowUltra modified by Sisulizer Copyright © 2007-18 by Jim Hale - Based on WowBB Copyright © 2003-2006 Aycan Gulez

Impress - Privacy statement

Sisulizer software localization tool - Three simple steps to localize