Repository navigation
Conversation
A file's culture is the first part of its name, folders included, that is a culture as .NET writes it, read through the runtime's own LocaleFileNames from where the file's source begins its names. A JSON file is a locale file when it carries $localization, sits in a .locales folder, or has a file name ending in a culture. Every embedded file is the assembly's own. An application, an executable or an assembly its build marks, also reads its files for every assembly their names start with, so LOC0112 leaves such a file to that assembly, and reads a type's reach from every section it reads, whether or not the section's entries win.
A locale pack's file is read for the longest assembly name its name starts with, the culture standing before that name or after it, rather than for its first folder, and is held to the types of the project building that assembly. LOC0025 judges it by that project's line. BREAKING CHANGE: LOC0024 reports each pack file whose name starts with no assembly the solution builds or references, at the file, rather than each top-level folder at the pack's project file; an ignoreDiagnostics entry for LOC0024 names the pack's files.
An application's file whose longest assembly name is another's is laid out from that assembly's root namespace, so LOC0023 no longer counts it among the project's own files when the root namespace is undeclared.
A folder named for a type is reported outside any folder of locale files too, and a type's own file in a culture folder is left alone.
Two files of one source may stand for one name, so LOC0117 is retired. LOC0120 reports, as an error, an entry a type reads that two files of one source give different texts, met as the runtime collects the type's entries from the embedded files and each pack, at the file whose name sorts first. BREAKING CHANGE: LOC0117 is retired, and a .locali.json naming it is reported as LOC0020; LOC0120 is new, and an error.
An application reads its files for every assembly their names start with. Where a project of the run builds that assembly, LOC0112 and LOC0120 read such a file as the runtime does, from that assembly's root namespace, and hold it to that assembly's types. A file the application may read for an assembly out of reach, one it references from a package or one a part of its name could start that the run does not know, is left alone. LOC0112 reports a library's file named for an assembly as one only an application or a locale pack reads by that name.
LOC0120 reads an application's files for the assembly their names start with, and leaves the files copied beside the application alone.
LOC0027 warns where a part of the root namespace a project's locale files are embedded under, the assembly's name unless the project names another, is a culture, and the project embeds a file under it: the runtime reads the first culture in a file's name as the file's, so it reads every such file for that culture.
LOC0122 warns where a part of the name a locale file is embedded under is a culture written in another case than .NET names it, ES or He or en-us: the runtime compares a culture exactly, so the file carries no culture and is never read, or the part, naming no type the run knows, is read into the name the file stands for.
LOC0121 warns where an application's file has a name that reads both in the application's own namespace and as another assembly's, and a type of each reads one of its sections, so its entries answer both.
Messages, documents and comments speak of a key's entries and texts, and of its source text in the source language, in the words Forma.Framework.Localization uses, rather than of translations and English.
The README and the localization skill describe the layout the runtime reads by default: a folder and a dot alike, a culture folder or a name ending in a culture, one entry per key within a source, and a pack's or an application's files named for the assembly they localize.
Renames the test methods, the checkers' locals and the test-standard prose that still spoke of translations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Promotes candidate at b0a3ee6, whose full gate passed in run 43646897952, to main for the release of 1.0.0-preview.13. The changes are in the changelog's 1.0.0-preview.13 entry.