PseudoLocalizer.Humanizer 0.9.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package PseudoLocalizer.Humanizer --version 0.9.0                
NuGet\Install-Package PseudoLocalizer.Humanizer -Version 0.9.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="PseudoLocalizer.Humanizer" Version="0.9.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add PseudoLocalizer.Humanizer --version 0.9.0                
#r "nuget: PseudoLocalizer.Humanizer, 0.9.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install PseudoLocalizer.Humanizer as a Cake Addin
#addin nuget:?package=PseudoLocalizer.Humanizer&version=0.9.0

// Install PseudoLocalizer.Humanizer as a Cake Tool
#tool nuget:?package=PseudoLocalizer.Humanizer&version=0.9.0                

Pseudolocalizer

NuGet

Build status OpenSSF Scorecard

Introduction

Pseudolocalizer is a .NET Global Tool for testing internationalization aspects of software. Specifically, it reads string values from resource files in the resx, XLIFF, or GetText Portable Object (PO) format and generates fake translations for the "qps-Ploc" pseudo-locale (MSDN).

The tool is run from the command line and provides the following options for the fake translation:

  • Add accents on all letters so that non-localized text can be spotted - but without making the text unreadable.
  • Make all words 30% longer, to ensure that there is room for translations.
  • Add brackets to show the start and end of each localized string. This makes it possible to spot strings that have been cut off.
  • Reverse all words ("mirror"), to simulate right-to-left locales.
  • Replace all characters with underscores so that non-localized text can be spotted.

See also

Installation

To install the tool from NuGet using the .NET SDK run:

dotnet tool install --global PseudoLocalize

Usage

Usage: pseudo-localize [/l] [/a] [/b] [/m] [/u] [/c culture] file [file...]
Generates pseudo-localized versions of the specified input file(s).

The input files must be resource files in Resx, Xlf, or PO file format.
The output will be written to a file next to the original, with .qps-Ploc
(or the output culture you specify) appended to its name. For example, if
the input file is X:\Foo\Bar.resx, then the output file will be
X:\Foo\Bar.qps-Ploc.resx.

Options:
  /h, --help         Show command line help.
  /v, --version      Show the version of the tool.
  /l, --lengthen     Make all words 30% longer, to ensure that there is room for translations.
  /a, --accents      Add accents on all letters so that non-localized text can be spotted.
  /b, --brackets     Add brackets to show the start and end of each localized string.
                     This makes it possible to spot cut off strings.
  /m, --mirror       Reverse all words ("mirror").
  /u, --underscores  Replace all characters with underscores.
  /c, --culture      Use the following string as the culture code in the output file name(s).
  /o, --overwrite    Overwrites the input file(s) with the pseudo-localized version.
  /f, --force        Suppresses the confirmation prompt for the --overwrite option.

The default options, if none are given, are: /l /a /b.

Library

The core functionality is also available as a NuGet package, as well as a NuGet package that plugs into the Humanizer library.

These allow you to programmatically pseudo-localize strings for other scenarios not catered for by the PseudoLocalize tool itself.

Took at look at the source code for PseudoLocalize for examples of how to use the library to pseudo-localize strings and process streams.

Packages Latest Version
PseudoLocalizer.Core NuGet
PseudoLocalizer.Humanizer NuGet

Installation

dotnet add package PseudoLocalizer.Core
dotnet add package PseudoLocalizer.Humanizer

Usage with Humanizer

To register pseudo-localization for Humanizer, add the following snippet to your application:

new PseudoLocalizer.Humanizer.PseudoHumanizer().Register();

Feedback

Any feedback or issues can be added to the issues for this project in GitHub.

Repository

The repository is hosted in GitHub: https://github.com/martincostello/Pseudolocalizer.git

License

This project is licensed under the MIT license.

Building and Testing

Compiling the tool yourself requires Git and the .NET SDK to be installed.

To build and test the tool locally from a terminal/command-line, run the following set of commands:

git clone https://github.com/martincostello/Pseudolocalizer.git
cd Pseudolocalizer
./build.sh
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.10.0 105 11/13/2024
0.9.1 594 6/7/2024
0.9.0 664 11/14/2023
0.8.0 1,219 11/8/2022
0.7.0 1,101 1/31/2022
0.6.0 377 11/19/2021
0.5.0 355 11/8/2021
0.4.1 584 7/12/2021
0.4.0 509 5/6/2021
0.3.0 794 9/16/2020
0.2.1 939 10/8/2019
0.2.0 556 9/23/2019
0.1.2 703 5/1/2019
0.1.1 655 2/18/2019
0.1.1-beta-1589 509 2/15/2019
0.1.0 1,054 12/9/2018
0.1.0-beta-1521 973 12/9/2018
0.1.0-beta-1433 616 11/15/2018
0.1.0-beta-1402 579 11/11/2018