Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Updated URLs via script

...

  1. Open Sisulizer project file /src/MarineLMS - Sisulizer Translation.slp
  2. Project → Scan for Changes 
  3. Select All to view all text which can be translated.
  4. Ctrl + F5 to search for any term you need to translate
  5. Make any translation/changes you need (see Translate Using Translation Engine)
  6. Project → Build in Selected Language will generate updated/new translation resx files
  7. Save the Sisulizer project
  8. Open MarineLMS solution in Visual Studio
    1. Include newly created translation resx files (created by Sisulizer) to MarineLMS solution
      1. The easiest way to find any new resx files created by Sisulizer is to check Sourcetree for uncommitted changes/unstaged files
      2. In VS, right click resx file and select Include in Project (enable Show All Files in the Solution Explorer to find resx files which are not yet added to the solution)
    2. Update the newly added resx file's properties (2) to match the values of the default resx file
      1. Custom Tool: PublicResXFileCodeGenerator
      2. Custom Tool Namespace: [[namespace from corresponding default resx file]]
    3. Example: if you added the translation resx file AssessmentSummaryRx.en-US-Disney.resx, there is always a default resx file AssessmentSummaryRx.resx.
  9. Commit all resx files and the Sisulizer project files /src/MarineLMS - Sisulizer Translation.slp and /src/MarineLMS - Sisulizer Translation.sds (note: the sds file is updated once Sisulizer is closed)

...

Use DatePicker in cshtml

(Note: This information is obsolete when the DateInput component is used. Moving forward @Html.DateInput(...) should be used when a date picker is required in a view.)

The date picker classes data-date-format and data-date-language must exist and have the correct values.

...

Handling Resx Files in Visual Studio

Only the Core Web The MarineLMS.Web.Main project is currently maintained for resx file the only project using resx files and translations with Sisulizer. Resx files in any other VS project is are ignored as of now.In  In general, you only need to worry about the English (defaultpay attention to default (English) resx files in the VS solutionproject MarineLMS.Web.Main. All translation (other language specific) resx files (translations) are maintained by the Sisulizer tool. There are a few exceptions when adding new /or removing resx files (see below for more details). Don't change/update any Changes and updates of names/values within a translation resx file . Changes to translation resx files will be are ignored and overwritten by Sisulizer. Any update to a translation text must be done in Sisulizer instead. Having said that, changes to default resx files must be done in VS solution because Sisulizer uses all default resx files as truth (see 'Information Flow Between VS Solution and Sisulizer with Respect to Resx Files' below).

Sisulizer matches default resx values to allow translation of that value. That means a default resx value is treated as a read-only key by Sisulizer. If a resx file has moved but the values are the same, the translations known by Sisulizer remain and don't have to be translated again. However, if the default resx value changes, that value needs to be translated in Sisulizer as it shows up as a new (unknown) entry.

Important: Please let Stefan (stefan@marinels.com) know about any changes to/new resx files so he can run Sisulizer to update the translation resx files and get new text translated. This will keep Core up to date with any translations. 

Information Flow Between VS Solution and Sisulizer with Respect to Resx Files

Default resx files: VS solution is the authoritative truth and changes made to those resx files in VS solution are adopted into Sisulizer

Translation resx files: Sisulizer is the authoritative truth and changes made in Sisulizer are pushed into VS solution (overwriting any changes to translation resx files in VS solution)

Add new Default Resx File

If you need to add a new resx file needs to be added, only add the default resx file only (i.e. AssessmentSelectorControllerRx.resx). Any translation resx files and their names/values are handled/created by Sisulizer (i.e. AssessmentSelectorControllerRx.fr-CA.resx and AssessmentSelectorControllerRx.en-US-Disney.resx).

Note: if Sisulizer is generating generates the translation resx files for the first time those any new default resx file. The translation resx files need to be manually added to the VS solution once (see Update Resx Files and/or Create Translations for Core).

Edit Existing Resx Name/Value

...

Delete all resx files (default and all translations) from the VS solution. Sisulizer will catch up on the changes because the default resx file was removed.

Note: If translation resx files were left in place they'd become orphaned because Sisulizer wouldn't delete or even read them once the default resx file was removed.

Rename or Move Resx File

...

Rename or move resx files can be done in two ways:

  1. Rename or move all resx files (default and translations) - if the default resx file

...

  1. was renamed, the translation resx files

...

  1. need to be renamed accordingly
  2. Rename or move default resx file only and delete all their corresponding translation resx files from the VS solution. Sisulizer will generate new translation resx files for the renamed/moved default resx file.

...

  1. However, follow the steps at Update Resx Files and/or Create Translations for Core to re-add the translation resx files to the VS solution

...

  1. again.

Trips and Pitfalls

  • Make sure that the default resx file and their translation resx files have the same Custom Tool Namespace and Custom Tool = PublicResXFileCodeGenerator (the designer resx file must exist)

Translate Using Translation Engine

If resx files are moved around previously translations are removed. However, the previous translations are remembered by Sisulizer as Unused Items. They are a good source of translation for any new item.

To tap into the 'background' translation list use Project > Translate Using Translation Engine > Use "Embedded".

Image Added

Note: there is a notion of Translation Engine which supposed to be a translation list/dictionary. Any 'unused item' could be moved into that translation engine and even edited. I (Stefan) haven't had the time to investigate that. The goal would be to utilize that translation list for future translations.

Filter by label (Content by label)
showLabelsfalse
max5
spacesPS
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel = "kb-how-to-article" and type = "page" and space = "PS"
labelskb-how-to-article

...