Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Lorem Ipsum Generator tool #130

Merged
merged 8 commits into from
Jan 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Many tools are available.
- Generators
- Hash (MD5, SHA1, SHA256, SHA512)
- UUID 1 and 4
- Lorem Ipsum
- Text
- Inspector & Case Converter
- Regex Tester
Expand Down Expand Up @@ -84,6 +85,7 @@ Here is the list of tool name you can use:
- `base64` - Base64 Encoder/Decoder
- `hash` - Hash Generator
- `uuid` - UUID Generator
- `loremipsum` - Lorem Ipsum Generator
- `jsonformat` Json Formatter
- `jsonyaml` - Json <> Yaml
- `jwt` - JWT Decoder
Expand Down
26 changes: 25 additions & 1 deletion THIRD-PARTY-NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This project incorporates components from the projects listed below. The origina
10. Markdig (https://github.com/xoofx/markdig)
11. github-markdown-css (https://github.com/sindresorhus/github-markdown-css)
12. Efficient Compression Tool (https://github.com/fhanau/Efficient-Compression-Tool)
13. NLipsum (https://github.com/alexcpendleton/NLipsum)

Newtonsoft.Json NOTICES AND INFORMATION BEGIN HERE
=========================================
Expand Down Expand Up @@ -434,4 +435,27 @@ Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
limitations under the License.

NLipsum NOTICES AND INFORMATION BEGIN HERE
=========================================
The MIT License (MIT)

Copyright (c) 2015 Alex Pendleton

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,6 @@
<NuGet_Win2D>1.26.0</NuGet_Win2D>
<NuGet_YamlDotNet>11.2.1</NuGet_YamlDotNet>
<NuGet_IdentityModelTokenJwt>6.13.1</NuGet_IdentityModelTokenJwt>
<NuGet_NLipsum>1.1.0</NuGet_NLipsum>
</PropertyGroup>
</Project>
18 changes: 18 additions & 0 deletions src/dev/impl/DevToys/Assets/Icons/LoremIpsum.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 14 additions & 1 deletion src/dev/impl/DevToys/DevToys.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
Expand Down Expand Up @@ -47,6 +47,8 @@
<Compile Include="ViewModels\Tools\Converters\ConvertersGroupToolProvider.cs" />
<Compile Include="ViewModels\Tools\EncodersDecoders\EncodersDecodersGroupToolProvider.cs" />
<Compile Include="ViewModels\Tools\Generators\GeneratorsGroupToolProvider.cs" />
<Compile Include="ViewModels\Tools\Generators\LoremIpsumGenerator\LoremIpsumGeneratorToolProvider.cs" />
<Compile Include="ViewModels\Tools\Generators\LoremIpsumGenerator\LoremIpsumGeneratorToolViewModel.cs" />
<Compile Include="ViewModels\Tools\Graphic\GraphicGroupToolProvider.cs" />
<Compile Include="ViewModels\Tools\GroupToolProviderBase.cs" />
<Compile Include="ViewModels\Tools\GroupToolViewModel.cs" />
Expand All @@ -71,6 +73,9 @@
<Compile Include="Views\Tools\HtmlEncoderDecoder\HtmlEncoderDecoderToolPage.xaml.cs">
<DependentUpon>HtmlEncoderDecoderToolPage.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Tools\LoremIpsumGenerator\LoremIpsumGeneratorToolPage.xaml.cs">
<DependentUpon>LoremIpsumGeneratorToolPage.xaml</DependentUpon>
</Compile>
<Compile Include="Views\Tools\PngJpgCompressor\PngJpgCompressorToolPage.xaml.cs">
<DependentUpon>PngJpgCompressorToolPage.xaml</DependentUpon>
</Compile>
Expand Down Expand Up @@ -214,6 +219,9 @@
<Content Include="Assets\Icons\Guid.svg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Icons\LoremIpsum.svg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Icons\MarkdownPreview.svg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down Expand Up @@ -496,6 +504,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\Tools\LoremIpsumGenerator\LoremIpsumGeneratorToolPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Views\Tools\NumberBaseConverter\NumberBaseConverterToolPage.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand Down Expand Up @@ -562,6 +574,7 @@
<PackageReference Include="Microsoft.Toolkit.Uwp.UI.Controls" Version="$(Nuget_MicrosoftToolkitUwpUIControls)" />
<PackageReference Include="Microsoft.UI.Xaml" Version="$(NuGet_MicrosoftUIXaml)" />
<PackageReference Include="Newtonsoft.Json" Version="$(NuGet_NewtonsoftJson)" />
<PackageReference Include="NLipsum" Version="$(NuGet_NLipsum)"/>
<PackageReference Include="System.Composition" Version="$(NuGet_DotNet)" />
<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="$(NuGet_IdentityModelTokenJwt)" />
<PackageReference Include="YamlDotNet" Version="$(NuGet_YamlDotNet)" />
Expand Down
76 changes: 76 additions & 0 deletions src/dev/impl/DevToys/LanguageManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ public partial class LanguageManager : ObservableObject
private readonly JsonFormatterStrings _jsonformatter = new JsonFormatterStrings();
private readonly JsonYamlStrings _jsonyaml = new JsonYamlStrings();
private readonly JwtDecoderEncoderStrings _jwtdecoderencoder = new JwtDecoderEncoderStrings();
private readonly LoremIpsumGeneratorStrings _loremipsumgenerator = new LoremIpsumGeneratorStrings();
private readonly MainPageStrings _mainpage = new MainPageStrings();
private readonly MarkdownPreviewStrings _markdownpreview = new MarkdownPreviewStrings();
private readonly NumberBaseConverterStrings _numberbaseconverter = new NumberBaseConverterStrings();
Expand Down Expand Up @@ -100,6 +101,11 @@ public partial class LanguageManager : ObservableObject
/// </summary>
public JwtDecoderEncoderStrings JwtDecoderEncoder => _jwtdecoderencoder;

/// <summary>
/// Gets the <see cref="LoremIpsumGeneratorStrings"/>.
/// </summary>
public LoremIpsumGeneratorStrings LoremIpsumGenerator => _loremipsumgenerator;

/// <summary>
/// Gets the <see cref="MainPageStrings"/>.
/// </summary>
Expand Down Expand Up @@ -845,6 +851,76 @@ public class JwtDecoderEncoderStrings : ObservableObject
public string SearchDisplayName => _resources.GetString("SearchDisplayName");
}

public class LoremIpsumGeneratorStrings : ObservableObject
{
private readonly ResourceLoader _resources = ResourceLoader.GetForViewIndependentUse("LoremIpsumGenerator");

/// <summary>
/// Gets the resource AccessibleName.
/// </summary>
public string AccessibleName => _resources.GetString("AccessibleName");

/// <summary>
/// Gets the resource Configuration.
/// </summary>
public string Configuration => _resources.GetString("Configuration");

/// <summary>
/// Gets the resource Description.
/// </summary>
public string Description => _resources.GetString("Description");

/// <summary>
/// Gets the resource LengthDescription.
/// </summary>
public string LengthDescription => _resources.GetString("LengthDescription");

/// <summary>
/// Gets the resource LengthTitle.
/// </summary>
public string LengthTitle => _resources.GetString("LengthTitle");

/// <summary>
/// Gets the resource MenuDisplayName.
/// </summary>
public string MenuDisplayName => _resources.GetString("MenuDisplayName");

/// <summary>
/// Gets the resource Output.
/// </summary>
public string Output => _resources.GetString("Output");

/// <summary>
/// Gets the resource ParagraphsType.
/// </summary>
public string ParagraphsType => _resources.GetString("ParagraphsType");

/// <summary>
/// Gets the resource SearchDisplayName.
/// </summary>
public string SearchDisplayName => _resources.GetString("SearchDisplayName");

/// <summary>
/// Gets the resource SentencesType.
/// </summary>
public string SentencesType => _resources.GetString("SentencesType");

/// <summary>
/// Gets the resource TypeDescription.
/// </summary>
public string TypeDescription => _resources.GetString("TypeDescription");

/// <summary>
/// Gets the resource TypeTitle.
/// </summary>
public string TypeTitle => _resources.GetString("TypeTitle");

/// <summary>
/// Gets the resource WordsType.
/// </summary>
public string WordsType => _resources.GetString("WordsType");
}

public class MainPageStrings : ObservableObject
{
private readonly ResourceLoader _resources = ResourceLoader.GetForViewIndependentUse("MainPage");
Expand Down
159 changes: 159 additions & 0 deletions src/dev/impl/DevToys/Strings/cs-CZ/LoremIpsumGenerator.resw
Original file line number Diff line number Diff line change
@@ -0,0 +1,159 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema

Version 2.0

The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.

Example:

... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>

There are any number of "resheader" rows that contain simple
name/value pairs.

Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.

The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:

Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.

mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="AccessibleName" xml:space="preserve">
<value>Lorem Ipsum Generator tool</value>
</data>
<data name="Configuration" xml:space="preserve">
<value>Configuration</value>
</data>
<data name="Description" xml:space="preserve">
<value>Generate Lorem Ipsum placeholder text</value>
</data>
<data name="LengthDescription" xml:space="preserve">
<value>Number of words, sentences or paragraphs to generate</value>
</data>
<data name="LengthTitle" xml:space="preserve">
<value>Length</value>
</data>
<data name="MenuDisplayName" xml:space="preserve">
<value>Lorem Ipsum</value>
</data>
<data name="Output" xml:space="preserve">
<value>Output</value>
</data>
<data name="ParagraphsType" xml:space="preserve">
<value>Paragraphs</value>
</data>
<data name="SearchDisplayName" xml:space="preserve">
<value>Lorem Ipsum Generator</value>
</data>
<data name="SentencesType" xml:space="preserve">
<value>Sentences</value>
</data>
<data name="TypeDescription" xml:space="preserve">
<value>Generate words, sentences or paragraphs of Lorem Ipsum</value>
</data>
<data name="TypeTitle" xml:space="preserve">
<value>Type</value>
</data>
<data name="WordsType" xml:space="preserve">
<value>Words</value>
</data>
</root>
Loading