Updated all translation issues to more accurately say not supported.

This commit is contained in:
Phyllis Lai 2019-04-29 20:58:32 -07:00
Родитель b43759e861
Коммит b44898ec22
28 изменённых файлов: 70 добавлений и 75 удалений

Двоичные данные
source/Issues/LT0001.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0002.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0003.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0004.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0005.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0006.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0007.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0009.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0010.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0011.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0012.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0013.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0014.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0015.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0016.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0017.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0018.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0019.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0022.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0023.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0024.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0025.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0026.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0027.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0028.md

Двоичный файл не отображается.

Двоичные данные
source/Issues/LT0029.md

Двоичный файл не отображается.

Просмотреть файл

@ -248,14 +248,6 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
break;
case CompositionObjectType.ContainerVisual:
case CompositionObjectType.ShapeVisual:
if (shapeVisual != null)
{
yield return shapeVisual;
shapeVisual = null;
}
yield return (Visual)item;
break;
case CompositionObjectType.SpriteVisual:
if (shapeVisual != null)
{
@ -286,13 +278,13 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
if (mask.Inverted)
{
_issues.MaskWithInvert();
_issues.MaskWithInvertIsNotSupported();
}
if (mask.Opacity.IsAnimated ||
mask.Opacity.InitialValue != 100)
{
_issues.MaskWithAlpha();
_issues.MaskWithAlphaIsNotSupported();
}
if (mask.Mode != Mask.MaskMode.Additive)
@ -304,7 +296,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
// If possible users should combine masks when exporting to json.
if (layer.Masks.Length > 1)
{
_issues.MultipleShapeMasks();
_issues.MultipleShapeMasksIsNotSupported();
}
// Add a mask as a clip path if it can support the mask properties
@ -404,12 +396,12 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
if (layer.BlendMode != BlendMode.Normal)
{
_issues.BlendMode(layer.BlendMode.ToString());
_issues.BlendModeNotNormal(layer.BlendMode.ToString());
}
if (layer.TimeStretch != 1)
{
_issues.TimeStretch();
_issues.TimeStretchIsNotSupported();
}
if (layer.IsHidden)
@ -674,12 +666,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
var content = CreateSpriteVisual();
containerVisualContentNode.Children.Add(content);
var referencedLayersAsset = _lc.Assets.GetAssetById(layer.RefId);
if (referencedLayersAsset == null)
{
_issues.ReferencedAssetDoesNotExist();
return null;
}
var referencedLayersAsset = GetAssetById(layer.RefId);
switch (referencedLayersAsset.Type)
{
@ -687,7 +674,8 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
var imageAsset = (ImageAsset)referencedLayersAsset;
content.Size = new Sn.Vector2((float)imageAsset.Width, (float)imageAsset.Height);
// TODO: Remove the red brush. This is for prototype purpose.
// For prototyping purpose, adding a red brush as a placeholder for where an image asset should be drawn.
// TODO - remove red brush and support image asset.
var brush = CreateColorBrush(LottieData.Color.FromArgb(1, 1, 0, 0));
content.Brush = brush;
break;
@ -730,12 +718,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
#endif
// TODO - the animations produced inside a PreComp need to be time-mapped.
var referencedLayersAsset = _lc.Assets.GetAssetById(layer.RefId);
if (referencedLayersAsset == null)
{
_issues.ReferencedAssetDoesNotExist();
return null;
}
var referencedLayersAsset = GetAssetById(layer.RefId);
switch (referencedLayersAsset.Type)
{
@ -757,6 +740,18 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
return result;
}
internal Asset GetAssetById(string assetId)
{
var referencedAsset = _lc.Assets.GetAssetById(assetId);
if (referencedAsset == null)
{
_issues.ReferencedAssetDoesNotExist(assetId);
return null;
}
return referencedAsset;
}
sealed class ShapeContentContext
{
readonly LottieToWinCompTranslator _owner;
@ -789,7 +784,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
switch (popped.ContentType)
{
case ShapeContentType.LinearGradientFill:
_owner._issues.GradientFill();
_owner._issues.GradientFillIsNotSupported();
{
// We don't yet support gradient fill, but we can at least
// draw something. Use data from the first gradient stop as the fill.
@ -803,7 +798,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
break;
case ShapeContentType.RadialGradientFill:
_owner._issues.GradientFill();
_owner._issues.GradientFillIsNotSupported();
{
// We don't yet support gradient fill, but we can at least
// draw something. Use data from the first gradient stop as the fill.
@ -819,7 +814,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
case ShapeContentType.LinearGradientStroke:
case ShapeContentType.RadialGradientStroke:
_owner._issues.GradientStroke();
_owner._issues.GradientStrokeIsNotSupported();
break;
case ShapeContentType.SolidColorFill:
@ -913,7 +908,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
else
{
// The animations overlap. We currently don't support this case.
_owner._issues.AnimationMultiplication();
_owner._issues.AnimationMultiplicationIsNotSupported();
return a;
}
}
@ -1007,7 +1002,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
}
}
_owner._issues.MultipleFills();
_owner._issues.MultipleFillsIsNotSupported();
return b;
}
@ -1034,7 +1029,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
}
// The new stroke should be in addition to the existing stroke. And colors should blend.
_owner._issues.MultipleStrokes();
_owner._issues.MultipleStrokesIsNotSupported();
return b;
}
@ -1063,7 +1058,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
}
}
_owner._issues.MultipleAnimatedRoundedCorners();
_owner._issues.MultipleAnimatedRoundedCornersIsNotSupported();
return b;
}
@ -1107,7 +1102,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
}
}
_owner._issues.MultipleTrimPaths();
_owner._issues.MultipleTrimPathsIsNotSupported();
return b;
}
}
@ -1193,7 +1188,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
if (geometryCount > 1 && pathCount != geometryCount)
{
_issues.CombiningMultipleShapes();
_issues.CombiningMultipleShapesIsNotSupported();
}
}
@ -1240,7 +1235,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
if (repeaterCount.IsAnimated || repeaterOffset.IsAnimated || repeaterOffset.InitialValue != 0)
{
// TODO - handle all cases.
_issues.Repeater();
_issues.RepeaterIsNotSupported();
}
else
{
@ -1328,7 +1323,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
break;
case ShapeContentType.Polystar:
_issues.Polystar();
_issues.PolystarIsNotSupported();
break;
case ShapeContentType.Rectangle:
container.Shapes.Add(TranslateRectangleContent(context, shapeContext, (Rectangle)shapeContent));
@ -1352,7 +1347,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
break;
case ShapeContentType.Repeater:
// TODO - handle all cases. Not clear whether this is valid. Seen on 0605.traffic_light.
_issues.Repeater();
_issues.RepeaterIsNotSupported();
break;
default:
case ShapeContentType.SolidColorStroke:
@ -1465,7 +1460,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
{
// There will be stack overflows if the CanvasGeometry.Combine is too large.
// Usually not a problem, but handle degenerate cases.
_issues.MergingALargeNumberOfShapes();
_issues.MergingALargeNumberOfShapesIsNotSupported();
geometries = geometries.Take(50).ToArray();
}
@ -1513,7 +1508,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
yield return MergeShapeLayerContent(context, shapeContext, stack, ((MergePaths)shapeContent).Mode);
break;
case ShapeContentType.Repeater:
_issues.Repeater();
_issues.RepeaterIsNotSupported();
break;
case ShapeContentType.Transform:
// TODO - do we need to clear out the transform when we've finished with this call to CreateCanvasGeometries?? Maybe the caller should clone the context.
@ -1541,7 +1536,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
yield return CreateWin2dRectangleGeometry(context, shapeContext, (Rectangle)shapeContent);
break;
case ShapeContentType.Polystar:
_issues.Polystar();
_issues.PolystarIsNotSupported();
break;
default:
throw new InvalidOperationException();
@ -1640,7 +1635,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
if (pathData.IsAnimated)
{
_issues.CombiningAnimatedShapes();
_issues.CombiningAnimatedShapesIsNotSupported();
}
var transform = CreateMatrixFromTransform(context, shapeContext.Transform);
@ -1666,7 +1661,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
if (ellipsePosition.IsAnimated || ellipseDiameter.IsAnimated)
{
_issues.CombiningAnimatedShapes();
_issues.CombiningAnimatedShapesIsNotSupported();
}
var xRadius = ellipseDiameter.InitialValue.X / 2;
@ -1703,7 +1698,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
if (position.IsAnimated || size.IsAnimated || cornerRadius.IsAnimated)
{
_issues.CombiningAnimatedShapes();
_issues.CombiningAnimatedShapesIsNotSupported();
}
var width = size.InitialValue.X;
@ -1902,7 +1897,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
if (size.IsAnimated && isPartialTrimPath)
{
// Warn that we might be getting things wrong
_issues.AnimatedRectangleWithTrimPath();
_issues.AnimatedRectangleWithTrimPathIsNotSupported();
}
var width = size.InitialValue.X;
@ -1927,7 +1922,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
if (trimmedRadius.IsAnimated || trimmedRadius.InitialValue != 0)
{
// TODO - can rounded corners be implemented by composing cubic beziers?
_issues.PathWithRoundedCorners();
_issues.PathWithRoundedCornersIsNotSupported();
}
}
}
@ -2197,7 +2192,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
if (trimOffsetDegrees != 0)
{
// TODO - can be handled with another property.
_issues.AnimatedTrimOffsetWithStaticTrimOffset();
_issues.AnimatedTrimOffsetWithStaticTrimOffsetIsNotSupported();
}
if (trimPathOffsetDegrees.IsAnimated)
@ -2343,7 +2338,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
Visual TranslateTextLayer(TranslationContext context, TextLayer layer)
{
// Text layers are not yet suported.
_issues.TextLayer();
_issues.TextLayerIsNotSupported();
return null;
}
@ -3166,7 +3161,7 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
if (opacityPercent.IsAnimated)
{
// TOOD: multiply animations to produce a new set of key frames for the opacity-multiplied color.
_issues.OpacityAndColorAnimatedTogether();
_issues.OpacityAndColorAnimatedTogetherIsNotSupported();
return color;
}
else

Просмотреть файл

@ -32,61 +32,61 @@ namespace Microsoft.Toolkit.Uwp.UI.Lottie.LottieToWinComp
internal (string Code, string Description)[] GetIssues() => _issues.ToArray();
internal void AnimatedRectangleWithTrimPath() => Report("LT0001", "Rectangle with animated size and TrimPath");
internal void AnimatedRectangleWithTrimPathIsNotSupported() => Report("LT0001", "Rectangle with animated size and TrimPath is not supported");
internal void AnimatedTrimOffsetWithStaticTrimOffset() => Report("LT0002", "Animated trim offset with static trim offset");
internal void AnimatedTrimOffsetWithStaticTrimOffsetIsNotSupported() => Report("LT0002", "Animated trim offset with static trim offset is not supported");
internal void AnimationMultiplication() => Report("LT0003", "Multiplication of two or more animated values");
internal void AnimationMultiplicationIsNotSupported() => Report("LT0003", "Multiplication of two or more animated values is not supported");
internal void BlendMode(string blendMode) => Report("LT0004", $"Blend mode: {blendMode}");
internal void BlendModeNotNormal(string blendMode) => Report("LT0004", $"Blend mode is {blendMode}. Expected Normal.");
internal void CombiningAnimatedShapes() => Report("LT0005", "Combining animated shapes");
internal void CombiningAnimatedShapesIsNotSupported() => Report("LT0005", "Combining animated shapes is not supported");
internal void GradientFill() => Report("LT0006", "Gradient fill");
internal void GradientFillIsNotSupported() => Report("LT0006", "Gradient fill is not supported");
internal void GradientStroke() => Report("LT0007", "Gradient stroke");
internal void GradientStrokeIsNotSupported() => Report("LT0007", "Gradient stroke is not supported");
internal void ImageLayerIsNotSupported() => Report("LT0009", "Image layers is not supported");
internal void ImageLayerIsNotSupported() => Report("LT0009", "Image layers are not supported");
internal void MergingALargeNumberOfShapes() => Report("LT0010", "Merging a large number of shapes");
internal void MergingALargeNumberOfShapesIsNotSupported() => Report("LT0010", "Merging a large number of shape is not supported");
internal void MultipleAnimatedRoundedCorners() => Report("LT0011", "Multiple animated rounded corners");
internal void MultipleAnimatedRoundedCornersIsNotSupported() => Report("LT0011", "Multiple animated rounded corners is not supported");
internal void MultipleFills() => Report("LT0012", "Multiple fills");
internal void MultipleFillsIsNotSupported() => Report("LT0012", "Multiple fills is not supported");
internal void MultipleStrokes() => Report("LT0013", "Multiple strokes");
internal void MultipleStrokesIsNotSupported() => Report("LT0013", "Multiple strokes is not supported");
internal void MultipleTrimPaths() => Report("LT0014", "Multiple trim paths");
internal void MultipleTrimPathsIsNotSupported() => Report("LT0014", "Multiple trim paths is not supported");
internal void OpacityAndColorAnimatedTogether() => Report("LT0015", "Opacity and color animated at the same time");
internal void OpacityAndColorAnimatedTogetherIsNotSupported() => Report("LT0015", "Opacity and color animated at the same time is not supported");
internal void PathWithRoundedCorners() => Report("LT0016", "Path with rounded corners");
internal void PathWithRoundedCornersIsNotSupported() => Report("LT0016", "Path with rounded corners is not supported");
internal void Polystar() => Report("LT0017", "Polystar");
internal void PolystarIsNotSupported() => Report("LT0017", "Polystar is not supported");
internal void Repeater() => Report("LT0018", "Repeater");
internal void RepeaterIsNotSupported() => Report("LT0018", "Repeater is not supported");
internal void TextLayer() => Report("LT0019", "Text layer");
internal void TextLayerIsNotSupported() => Report("LT0019", "Text layer is not supported");
internal void ThreeDIsNotSupported() => Report("LT0020", "3d composition is not supported");
internal void ThreeDLayerIsNotSupported() => Report("LT0021", "3d layer is not supported");
internal void TimeStretch() => Report("LT0022", "Time stretch");
internal void TimeStretchIsNotSupported() => Report("LT0022", "Time stretch is not supported");
internal void MaskWithInvert() => Report("LT0023", "Mask with invert");
internal void MaskWithInvertIsNotSupported() => Report("LT0023", "Mask with invert is not supported");
internal void MaskWithUnsupportedMode(string mode) => Report("LT0024", $"Mask mode: {mode}");
internal void MaskWithUnsupportedMode(string mode) => Report("LT0024", $"Mask mode: {mode} is not supported");
internal void MaskWithAlpha() => Report("LT0025", "Mask with alpha value other than 1");
internal void MaskWithAlphaIsNotSupported() => Report("LT0025", "Mask with alpha value other than 1 is not supported");
internal void MultipleShapeMasks() => Report("LT0026", "Mask with multiple shapes");
internal void MultipleShapeMasksIsNotSupported() => Report("LT0026", "Mask with multiple shapes is not supported");
internal void CombiningMultipleShapes() => Report("LT0027", "CombiningMultipleShapes");
internal void CombiningMultipleShapesIsNotSupported() => Report("LT0027", "Combining multiple shapes is not supported");
internal void ReferencedAssetDoesNotExist() => Report("LT0028", "ReferencedAssetDoesNotExist");
internal void ReferencedAssetDoesNotExist(string RefId) => Report("LT0028", $"Referenced asset {RefId} does not exist");
internal void InvalidAssetReferenceFromCurrentLayer(string currentLayerType, string assetRefId, string assetType, string expectedAssetType) => Report("LT0029", $"{currentLayerType} referenced asset {assetRefId} of type {assetType} which is invalid. Expected asset of type {expectedAssetType}.");
internal void InvalidAssetReferenceFromCurrentLayer(string currentLayerType, string assetRefId, string assetType, string expectedAssetType) => Report("LT0029", $"{currentLayerType} referenced asset {assetRefId} of type {assetType} which is invalid. Expected an asset of type {expectedAssetType}.");
void Report(string code, string description)
{