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

Reintroduce language files tests #12367

Merged
merged 3 commits into from May 16, 2022
Merged

Conversation

elit0451
Copy link
Member

@elit0451 elit0451 commented May 5, 2022

Details

Test

  • Make sure the tests succeed;
  • Make one of the language files located in ~\Umbraco.Core\EmbeddedResources\Lang folder invalid and verify that the Can_Load_Language_Xml_Files() test fails;
  • Add a new file in the same folder with an upper case name (ex: BG.xml) and verify that the LanguageFilesAreLowerCase() test fails with a message: Language files must be all lowercase but BG.xml is not lowercase..

@elit0451 elit0451 changed the base branch from v10/contrib to v10/dev May 5, 2022 19:35
Copy link
Contributor

@nikolajlauridsen nikolajlauridsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💪

@nikolajlauridsen nikolajlauridsen merged commit 2ed71a6 into v10/dev May 16, 2022
@nikolajlauridsen nikolajlauridsen deleted the v10/feature/language-tests branch May 16, 2022 12:24
bergmania pushed a commit that referenced this pull request May 17, 2022
* Reintroducing language files tests

* Fix casing

* Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
(cherry picked from commit 2ed71a6)
nikolajlauridsen added a commit that referenced this pull request May 19, 2022
* Reintroduce language files tests (#12367)

* Reintroducing language files tests

* Fix casing

* Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj

* Remove Umbraco.Templates from VerifyNuGet step

* Remove duplicate and unnecessary properties

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
nikolajlauridsen added a commit that referenced this pull request May 19, 2022
* Reintroduce language files tests (#12367)

* Reintroducing language files tests

* Fix casing

* Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

* Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj

* Remove Umbraco.Templates from VerifyNuGet step

* Remove duplicate and unnecessary properties

* Generate json schema on build

* Add targets file

* Gitignore auto generated appsettings schema

* Fix build not copying file

* Use the new path in appsettings

* Update copy message

* Build json schema as release

* Update json schema options

Otherwise just running the project will put the file in the wrong place

* Generate schema if it doesn't exist in Web.Ui

* Update json schema options

Otherwise just running the project will put the file in the wrong place

Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Co-authored-by: Ronald Barendse <ronald@barend.se>
p-m-j pushed a commit that referenced this pull request May 19, 2022
commit e0aa430
Author: Paul Johnson <pmj@umbraco.com>
Date:   Thu May 19 10:00:57 2022 +0100

    Fix typo in pipeline yaml

commit 2ec450f
Author: Paul Johnson <pmj@umbraco.com>
Date:   Thu May 19 09:14:47 2022 +0100

    Fix yaml conditions

commit c2d5480
Author: Paul Johnson <pmj@umbraco.com>
Date:   Thu May 19 09:02:50 2022 +0100

    Azure pipeline refactor (#12428)

    * Skip symbols for Umbraco.Templates

    * Resolve some test issues

    + Fixed whitespace dependant tests to pass regardless of build OS vs
    run OS.

    + Snap dictionary tests were failing when Configuration was release

    + Removed hardcoded baseUrl from one of the acceptance tests

    * Move docfx setup to ./build and fix

    * Update UI docs title

    * Added dockerfile that can be used when running the acceptance tests.

    * Take explicit dependency on System.Security.Cryptography.Pkcs

    * Refactor ci/cd pipeline

commit ee8359a
Author: Mole <nikolajlauridsen@protonmail.ch>
Date:   Thu May 19 09:57:21 2022 +0200

    V10: Reintroduce appsettings-schema.json (#12416)

    * Reintroduce language files tests (#12367)

    * Reintroducing language files tests

    * Fix casing

    * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

    * Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj

    * Remove Umbraco.Templates from VerifyNuGet step

    * Remove duplicate and unnecessary properties

    * Generate json schema on build

    * Add targets file

    * Gitignore auto generated appsettings schema

    * Fix build not copying file

    * Use the new path in appsettings

    * Update copy message

    * Build json schema as release

    * Update json schema options

    Otherwise just running the project will put the file in the wrong place

    * Generate schema if it doesn't exist in Web.Ui

    * Update json schema options

    Otherwise just running the project will put the file in the wrong place

    Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
    Co-authored-by: Ronald Barendse <ronald@barend.se>

commit dd617ed
Author: Ronald Barendse <ronald@barend.se>
Date:   Thu May 19 09:51:11 2022 +0200

    v10: Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj (#12413)

    * Reintroduce language files tests (#12367)

    * Reintroducing language files tests

    * Fix casing

    * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

    * Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj

    * Remove Umbraco.Templates from VerifyNuGet step

    * Remove duplicate and unnecessary properties

    Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

commit b832168
Author: Ronald Barendse <ronald@barend.se>
Date:   Thu May 19 08:36:04 2022 +0200

    v10: Project template database/connection string improvements (#12407)

    * Add new connection-string-provider-name parameter

    * Use template value forms to correctly encode JSON values

    * Add new development-database-type parameter

    * Update package template and fix App_Plugins directory rename

    * Remove conflicting short parameter name

    * Lowercase framework parameter to align with MS templates

    * Cleanup default template settings

    * Write unattended install parameters when either connection string or development database is set

    * Include RootNamespace in UmbracoPackage template

    * Update Umbraco specific gitignore rules

    * Revert "Lowercase framework parameter to align with MS templates"

    This reverts commit 22de389.

    * Add exclude-gitignore parameter

    * Update template schemas

    * Add minimal-gitignore parameter

commit e40049d
Author: Mole <nikolajlauridsen@protonmail.ch>
Date:   Wed May 18 15:22:51 2022 +0200

    Fix domain for invariant content nodes (#12405)

    Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>

commit a3692b8
Author: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Date:   Mon May 9 11:42:10 2022 +0200

    Use SnippetCollection to when working with snippets  (#12355)

    * Introducing a new Snippet type

    * Adding a SnippetCollection and SnippetCollectionBuilder

    * Using snippetCollection to get the snippets instead of fileService

    * Fixed fetching the correct content

    * Make ISnippet non-discoverable

    * Split the SnippetCollection into PartialViewSnippetCollection and PartialViewMacroSnippetCollection

    * Update CodeFileController to use the 2 snippet collections

    * Display the names with Empty.cshtml on top

    * Remove merging embedded snippets with custom snippets from ~\Umbraco.Web.UI\umbraco\PartialViewMacros\Templates folder for the Partial View Collection

    * Fix naming

    * Fix another naming

    * Cleanup + Use base items

    Co-authored-by: Bjarke Berg <mail@bergmania.dk>
    (cherry picked from commit 9326cc5)

commit 4f48a49
Author: patrickdemooij9 <patrickdemooij98@hotmail.com>
Date:   Fri Oct 8 11:18:00 2021 +0200

    Cherry picked from 4c08b44

commit 4fdbfee
Author: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Date:   Wed May 11 00:51:37 2022 +0200

    Show nicer overlay when clicking block card for deleted element type (#12140)

    * Show nicer overlay when clicking block card for deleted element type

    * Cleanup

    * Remove stop-scrolling container

    * Use flex-start instead on start

    * Remove legacy flexbox fallback

    * Remove unnecessary hack

    * Use standard gap property instead

    * Localization of message

    * Fix translation

    * End sentence with a dot

    (cherry picked from commit ebb1dc2)

commit 3856bf8
Author: Henk Jan Pluim <henkjan.pluim@greenchoice.nl>
Date:   Mon Apr 25 10:02:06 2022 +0200

    #fix 12254 return emptyresult

    (cherry picked from commit 7993d19)

commit 7087c3d
Author: Ronald Barendse <ronald@barend.se>
Date:   Tue May 17 12:59:01 2022 +0200

    v10: Use ForceCreateDatabase during unattended install and extend GetUmbracoConnectionString extension methods (#12397)

    * Add extension methods to get the Umbraco connection string/provider name from configuration

    * Added tests for configuration extension methods.

    * Fix issue with InstallMissingDatabase and ForceCreateDatabase

    * Fix comments

    * Revert casing change in GenerateConnectionString

    * Re-add AddOptions (without config binding) to fix test

    * Update src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs

    Co-authored-by: Ronald Barendse <ronald@barend.se>

    * Update src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs

    * Update src/Umbraco.Infrastructure/Runtime/RuntimeState.cs

    * Whitespace and documentation updates

    * Add DatabaseProviderMetadataExtensions

    * Filter before ordering

    * Replace DataDirectory placeholder when setting connection string

    Co-authored-by: Andy Butland <abutland73@gmail.com>
    Co-authored-by: Bjarke Berg <mail@bergmania.dk>
    (cherry picked from commit 8e6e262)

commit e90bf26
Author: Ronald Barendse <ronald@barend.se>
Date:   Tue May 17 07:33:54 2022 +0200

    v10: Support System.Data.SqlClient provider name (#12408)

    * Add support for System.Data.SqlClient provider name

    * Only update connection string when required

    (cherry picked from commit e82bcb1)

commit fd0637c
Author: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Date:   Mon May 16 14:23:59 2022 +0200

    Reintroduce language files tests (#12367)

    * Reintroducing language files tests

    * Fix casing

    * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
    (cherry picked from commit 2ed71a6)
Zeegaan pushed a commit that referenced this pull request May 24, 2022
commit e0aa430
Author: Paul Johnson <pmj@umbraco.com>
Date:   Thu May 19 10:00:57 2022 +0100

    Fix typo in pipeline yaml

commit 2ec450f
Author: Paul Johnson <pmj@umbraco.com>
Date:   Thu May 19 09:14:47 2022 +0100

    Fix yaml conditions

commit c2d5480
Author: Paul Johnson <pmj@umbraco.com>
Date:   Thu May 19 09:02:50 2022 +0100

    Azure pipeline refactor (#12428)

    * Skip symbols for Umbraco.Templates

    * Resolve some test issues

    + Fixed whitespace dependant tests to pass regardless of build OS vs
    run OS.

    + Snap dictionary tests were failing when Configuration was release

    + Removed hardcoded baseUrl from one of the acceptance tests

    * Move docfx setup to ./build and fix

    * Update UI docs title

    * Added dockerfile that can be used when running the acceptance tests.

    * Take explicit dependency on System.Security.Cryptography.Pkcs

    * Refactor ci/cd pipeline

commit ee8359a
Author: Mole <nikolajlauridsen@protonmail.ch>
Date:   Thu May 19 09:57:21 2022 +0200

    V10: Reintroduce appsettings-schema.json (#12416)

    * Reintroduce language files tests (#12367)

    * Reintroducing language files tests

    * Fix casing

    * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

    * Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj

    * Remove Umbraco.Templates from VerifyNuGet step

    * Remove duplicate and unnecessary properties

    * Generate json schema on build

    * Add targets file

    * Gitignore auto generated appsettings schema

    * Fix build not copying file

    * Use the new path in appsettings

    * Update copy message

    * Build json schema as release

    * Update json schema options

    Otherwise just running the project will put the file in the wrong place

    * Generate schema if it doesn't exist in Web.Ui

    * Update json schema options

    Otherwise just running the project will put the file in the wrong place

    Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
    Co-authored-by: Ronald Barendse <ronald@barend.se>

commit dd617ed
Author: Ronald Barendse <ronald@barend.se>
Date:   Thu May 19 09:51:11 2022 +0200

    v10: Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj (#12413)

    * Reintroduce language files tests (#12367)

    * Reintroducing language files tests

    * Fix casing

    * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

    * Change Umbraco.Cms and Umbraco.Templates nuspecs to csproj

    * Remove Umbraco.Templates from VerifyNuGet step

    * Remove duplicate and unnecessary properties

    Co-authored-by: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>

commit b832168
Author: Ronald Barendse <ronald@barend.se>
Date:   Thu May 19 08:36:04 2022 +0200

    v10: Project template database/connection string improvements (#12407)

    * Add new connection-string-provider-name parameter

    * Use template value forms to correctly encode JSON values

    * Add new development-database-type parameter

    * Update package template and fix App_Plugins directory rename

    * Remove conflicting short parameter name

    * Lowercase framework parameter to align with MS templates

    * Cleanup default template settings

    * Write unattended install parameters when either connection string or development database is set

    * Include RootNamespace in UmbracoPackage template

    * Update Umbraco specific gitignore rules

    * Revert "Lowercase framework parameter to align with MS templates"

    This reverts commit 22de389.

    * Add exclude-gitignore parameter

    * Update template schemas

    * Add minimal-gitignore parameter

commit e40049d
Author: Mole <nikolajlauridsen@protonmail.ch>
Date:   Wed May 18 15:22:51 2022 +0200

    Fix domain for invariant content nodes (#12405)

    Co-authored-by: Elitsa Marinovska <elm@umbraco.dk>

commit a3692b8
Author: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Date:   Mon May 9 11:42:10 2022 +0200

    Use SnippetCollection to when working with snippets  (#12355)

    * Introducing a new Snippet type

    * Adding a SnippetCollection and SnippetCollectionBuilder

    * Using snippetCollection to get the snippets instead of fileService

    * Fixed fetching the correct content

    * Make ISnippet non-discoverable

    * Split the SnippetCollection into PartialViewSnippetCollection and PartialViewMacroSnippetCollection

    * Update CodeFileController to use the 2 snippet collections

    * Display the names with Empty.cshtml on top

    * Remove merging embedded snippets with custom snippets from ~\Umbraco.Web.UI\umbraco\PartialViewMacros\Templates folder for the Partial View Collection

    * Fix naming

    * Fix another naming

    * Cleanup + Use base items

    Co-authored-by: Bjarke Berg <mail@bergmania.dk>
    (cherry picked from commit 9326cc5)

commit 4f48a49
Author: patrickdemooij9 <patrickdemooij98@hotmail.com>
Date:   Fri Oct 8 11:18:00 2021 +0200

    Cherry picked from 4c08b44

commit 4fdbfee
Author: Bjarne Fyrstenborg <bjarne_fyrstenborg@hotmail.com>
Date:   Wed May 11 00:51:37 2022 +0200

    Show nicer overlay when clicking block card for deleted element type (#12140)

    * Show nicer overlay when clicking block card for deleted element type

    * Cleanup

    * Remove stop-scrolling container

    * Use flex-start instead on start

    * Remove legacy flexbox fallback

    * Remove unnecessary hack

    * Use standard gap property instead

    * Localization of message

    * Fix translation

    * End sentence with a dot

    (cherry picked from commit ebb1dc2)

commit 3856bf8
Author: Henk Jan Pluim <henkjan.pluim@greenchoice.nl>
Date:   Mon Apr 25 10:02:06 2022 +0200

    #fix 12254 return emptyresult

    (cherry picked from commit 7993d19)

commit 7087c3d
Author: Ronald Barendse <ronald@barend.se>
Date:   Tue May 17 12:59:01 2022 +0200

    v10: Use ForceCreateDatabase during unattended install and extend GetUmbracoConnectionString extension methods (#12397)

    * Add extension methods to get the Umbraco connection string/provider name from configuration

    * Added tests for configuration extension methods.

    * Fix issue with InstallMissingDatabase and ForceCreateDatabase

    * Fix comments

    * Revert casing change in GenerateConnectionString

    * Re-add AddOptions (without config binding) to fix test

    * Update src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs

    Co-authored-by: Ronald Barendse <ronald@barend.se>

    * Update src/Umbraco.Core/Configuration/Models/ConnectionStrings.cs

    * Update src/Umbraco.Infrastructure/Runtime/RuntimeState.cs

    * Whitespace and documentation updates

    * Add DatabaseProviderMetadataExtensions

    * Filter before ordering

    * Replace DataDirectory placeholder when setting connection string

    Co-authored-by: Andy Butland <abutland73@gmail.com>
    Co-authored-by: Bjarke Berg <mail@bergmania.dk>
    (cherry picked from commit 8e6e262)

commit e90bf26
Author: Ronald Barendse <ronald@barend.se>
Date:   Tue May 17 07:33:54 2022 +0200

    v10: Support System.Data.SqlClient provider name (#12408)

    * Add support for System.Data.SqlClient provider name

    * Only update connection string when required

    (cherry picked from commit e82bcb1)

commit fd0637c
Author: Elitsa Marinovska <21998037+elit0451@users.noreply.github.com>
Date:   Mon May 16 14:23:59 2022 +0200

    Reintroduce language files tests (#12367)

    * Reintroducing language files tests

    * Fix casing

    * Update tests/Umbraco.Tests.UnitTests/Umbraco.Core/EmbeddedResources/LanguageXmlTests.cs

    Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
    (cherry picked from commit 2ed71a6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants