Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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 general, you only need to worry about the English (defaultpay attention to default (English) resx files in the VS solutionproject MarineLMS.Web.Main. All other language specific resx files (translations) are maintained by the Sisulizer tool. There are a few exceptions when adding new/removing resx files (see below for more details).

Don't change/update any Changes/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 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.

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. 

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, 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 default resx file and their translation resx files have the same Custom Tool Namespace and Custom Tool = PublicResXFileCodeGenerator (the designer resx file must exist)


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

...