31 references to MetadataKey
Microsoft.DotNet.XliffTasks (31)
Tasks\EnsureAllResourcesTranslated.cs (1)
25
string sourceDocumentPath = item.GetMetadataOrDefault(
MetadataKey
.SourceDocumentPath, item.ItemSpec);
Tasks\GatherTranslatedSource.cs (13)
27
string translatedFullPath = xlf.GetMetadataOrThrow(
MetadataKey
.XlfTranslatedFullPath);
28
string language = xlf.GetMetadataOrThrow(
MetadataKey
.XlfLanguage);
29
bool preserveFileName = string.Equals(xlf.GetMetadata(
MetadataKey
.XlfPreserveFileName), "true", StringComparison.OrdinalIgnoreCase);
61
string link = xlf.GetMetadata(
MetadataKey
.Link);
64
link = xlf.GetMetadataOrThrow(
MetadataKey
.XlfSource);
83
output.SetMetadata(
MetadataKey
.Link, link);
88
string manifestResourceName = xlf.GetMetadata(
MetadataKey
.ManifestResourceName);
92
output.SetMetadata(
MetadataKey
.ManifestResourceName, manifestResourceName);
98
string logicalName = xlf.GetMetadata(
MetadataKey
.LogicalName);
103
output.SetMetadata(
MetadataKey
.LogicalName, logicalName);
109
string dependentUpon = xlf.GetMetadata(
MetadataKey
.DependentUpon);
112
string sourceDirectory = Path.GetDirectoryName(xlf.GetMetadataOrThrow(
MetadataKey
.XlfSource));
116
output.SetMetadata(
MetadataKey
.DependentUpon, dependentUpon);
Tasks\GatherXlf.cs (9)
34
string sourceDocumentPath = source.GetMetadataOrDefault(
MetadataKey
.SourceDocumentPath, source.ItemSpec);
46
xlf.SetMetadata(
MetadataKey
.XlfSource, source.ItemSpec);
47
xlf.SetMetadata(
MetadataKey
.XlfTranslatedFullPath, GetTranslatedOutputPath(source, language, outputPaths));
48
xlf.SetMetadata(
MetadataKey
.XlfLanguage, language);
58
bool preserveFileName = string.Equals(source.GetMetadata(
MetadataKey
.XlfPreserveFileName), "true", StringComparison.OrdinalIgnoreCase);
60
string translatedFileName = source.GetMetadata(
MetadataKey
.XlfTranslatedFilename);
64
source.SetMetadata(
MetadataKey
.XlfTranslatedFilename, translatedFileName);
67
string sourceDocumentPath = source.GetMetadataOrDefault(
MetadataKey
.SourceDocumentPath, source.ItemSpec);
78
$"Give them unique names or set unique {
MetadataKey
.XlfTranslatedFilename} metadata.");
Tasks\SortXlf.cs (1)
23
string sourceDocumentPath = item.GetMetadataOrDefault(
MetadataKey
.SourceDocumentPath, item.ItemSpec);
Tasks\TranslateSource.cs (5)
19
string sourcePath = XlfFile.GetMetadataOrThrow(
MetadataKey
.XlfSource);
20
string sourceFormat = XlfFile.GetMetadataOrThrow(
MetadataKey
.XlfSourceFormat);
21
string language = XlfFile.GetMetadataOrThrow(
MetadataKey
.XlfLanguage);
22
string translatedFullPath = XlfFile.GetMetadataOrThrow(
MetadataKey
.XlfTranslatedFullPath);
26
TranslatableDocument sourceDocument = XlfTask.LoadSourceDocument(sourceAbsolutePath, XlfFile.GetMetadata(
MetadataKey
.XlfSourceFormat));
Tasks\UpdateXlf.cs (2)
33
string sourceDocumentPath = item.GetMetadataOrDefault(
MetadataKey
.SourceDocumentPath, item.ItemSpec);
34
string sourceFormat = item.GetMetadataOrThrow(
MetadataKey
.XlfSourceFormat);