补充imagetransformation和removecache页面的国际化

Signed-off-by: hexagon1337 <liuyaoming3@h-partners.com>
This commit is contained in:
hexagon1337 2024-09-23 12:14:04 +08:00
parent f1008e869e
commit 565938c98a
4 changed files with 240 additions and 32 deletions

View File

@ -78,7 +78,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('模糊效果').fontSize(20)
Text($r('app.string.Blur_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -91,7 +91,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('高亮效果').fontSize(20)
Text($r('app.string.Highlighting_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -104,7 +104,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('灰化效果').fontSize(20)
Text($r('app.string.Ashing_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -117,7 +117,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('反转效果').fontSize(20)
Text($r('app.string.Inverse_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -130,7 +130,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('动画滤镜效果').fontSize(20)
Text($r('app.string.Animation_filter_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -143,7 +143,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('裁剪圆形效果').fontSize(20)
Text($r('app.string.Crop_circular_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -156,7 +156,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('裁剪圆形带边框效果').fontSize(20)
Text($r('app.string.Crop_circular_with_border_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -168,7 +168,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('对比度效果').fontSize(20)
Text($r('app.string.Contrast_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -181,7 +181,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('乌墨色滤波效果').fontSize(20)
Text($r('app.string.Black_ink_filtering_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -193,7 +193,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('旋转效果').fontSize(20)
Text($r('app.string.Rotate')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -206,7 +206,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('圆角效果').fontSize(20)
Text($r('app.string.Corners')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -219,7 +219,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('桑原滤波效果').fontSize(20)
Text($r('app.string.Kuwahara_Filter_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -232,7 +232,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('像素化滤波效果').fontSize(20)
Text($r('app.string.Pixelated_Filter_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -245,7 +245,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('素描滤波效果').fontSize(20)
Text($r('app.string.Sketch_Filter_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -258,7 +258,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('扭曲滤波效果').fontSize(20)
Text($r('app.string.Distortion_Filter_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -271,7 +271,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('装饰滤波效果').fontSize(20)
Text($r('app.string.Decorative_Filter_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -284,7 +284,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('正方形裁剪效果').fontSize(20)
Text($r('app.string.Square_cutting_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -297,7 +297,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('上方裁剪效果').fontSize(20)
Text($r('app.string.Top_cutting_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -310,7 +310,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('中间裁剪效果').fontSize(20)
Text($r('app.string.Middle_cutting_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -323,7 +323,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('底下裁剪效果').fontSize(20)
Text($r('app.string.Bottom_cutting_effect')).fontSize(20)
}
Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) {
@ -336,7 +336,7 @@ struct ImageTransformation {
})
.width(30)
.height(30)
Text('遮罩效果').fontSize(20)
Text($r('app.string.Mask_effect')).fontSize(20)
}
if (this.isContrast) {

View File

@ -29,12 +29,12 @@ struct TestRemoveCache {
build() {
Column() {
Flex() {
Button("预加载gif图").onClick(() => {
Button($r('app.string.Preloading_GIF')).onClick(() => {
this.imageKnifeOption.loadSrc = "https://gd-hbimg.huaban.com/e0a25a7cab0d7c2431978726971d61720732728a315ae-57EskW_fw658";
this.url = "https://gd-hbimg.huaban.com/e0a25a7cab0d7c2431978726971d61720732728a315ae-57EskW_fw658";
})
.margin({left:10})
Button("内存缓存获取gif").onClick(() => {
Button($r('app.string.Retrieve_GIF_from_memory')).onClick(() => {
ImageKnife.getInstance()
.getCacheImage("https://gd-hbimg.huaban.com/e0a25a7cab0d7c2431978726971d61720732728a315ae-57EskW_fw658",
CacheStrategy.Memory)
@ -43,7 +43,7 @@ struct TestRemoveCache {
})
})
.margin({left:10})
Button("文件缓存获取gif").onClick(() => {
Button($r('app.string.Retrieve_GIF_from_disk')).onClick(() => {
ImageKnife.getInstance()
.getCacheImage("https://gd-hbimg.huaban.com/e0a25a7cab0d7c2431978726971d61720732728a315ae-57EskW_fw658",
CacheStrategy.File)
@ -55,12 +55,12 @@ struct TestRemoveCache {
}
Flex() {
Button("预加载静态图").onClick(() => {
Button($r('app.string.Preloading_static_images')).onClick(() => {
this.imageKnifeOption.loadSrc = 'https://hbimg.huabanimg.com/95a6d37a39aa0b70d48fa18dc7df8309e2e0e8e85571e-x4hhks_fw658/format/webp';
this.url = 'https://hbimg.huabanimg.com/95a6d37a39aa0b70d48fa18dc7df8309e2e0e8e85571e-x4hhks_fw658/format/webp';
})
.margin({left:10})
Button("内存缓存获取").onClick(() => {
Button($r('app.string.Retrieve_images_from_memory')).onClick(() => {
ImageKnife.getInstance()
.getCacheImage('https://hbimg.huabanimg.com/95a6d37a39aa0b70d48fa18dc7df8309e2e0e8e85571e-x4hhks_fw658/format/webp',
CacheStrategy.Memory)
@ -69,7 +69,7 @@ struct TestRemoveCache {
})
})
.margin({left:10})
Button("文件缓存获取").onClick(() => {
Button($r('app.string.Retrieve_images_from_disk')).onClick(() => {
ImageKnife.getInstance()
.getCacheImage('https://hbimg.huabanimg.com/95a6d37a39aa0b70d48fa18dc7df8309e2e0e8e85571e-x4hhks_fw658/format/webp',
CacheStrategy.File)
@ -81,19 +81,19 @@ struct TestRemoveCache {
}.margin({ top: 10 })
Flex() {
Button("删除全部缓存").onClick(() => {
Button($r('app.string.Delete_all_caches')).onClick(() => {
ImageKnife.getInstance()
.removeAllMemoryCache()
ImageKnife.getInstance()
.removeAllFileCache()
})
.margin({left:5})
Button("删除全部内存缓存").onClick(() => {
Button($r('app.string.Delete_all_memory_caches')).onClick(() => {
ImageKnife.getInstance()
.removeAllMemoryCache()
})
.margin({left:5})
Button("删除全部文件缓存").onClick(() => {
Button($r('app.string.Delete_all_file_caches')).onClick(() => {
ImageKnife.getInstance()
.removeAllFileCache()
})
@ -101,12 +101,12 @@ struct TestRemoveCache {
}.margin({ top: 10 })
Flex() {
Button("删除自定义内存缓存").onClick(() => {
Button($r('app.string.Delete_all_custom_memory_caches')).onClick(() => {
ImageKnife.getInstance()
.removeMemoryCache(this.url)
})
.margin({left:20})
Button("删除自定义文件缓存").onClick(() => {
Button($r('app.string.Delete_all_custom_file_caches')).onClick(() => {
ImageKnife.getInstance()
.removeFileCache(this.url)
})

View File

@ -259,6 +259,110 @@
{
"name": "Click_load_Uri",
"value": "Click to load Uri and display"
},
{
"name": "Delete_all_caches",
"value": "Delete all caches"
},
{
"name": "Delete_all_memory_caches",
"value": "Delete all memory caches"
},
{
"name": "Delete_all_file_caches",
"value": "Delete all file caches"
},
{
"name": "Delete_all_custom_memory_caches",
"value": "Delete all custom memory caches"
},
{
"name": "Delete_all_custom_file_caches",
"value": "Delete all custom file caches"
},
{
"name": "Blur_effect",
"value": "Blur effect"
},
{
"name": "Highlighting_effect",
"value": "Highlighting effect"
},
{
"name": "Ashing_effect",
"value": "Ashing effect"
},
{
"name": "Inverse_effect",
"value": "Inverse effect"
},
{
"name": "Animation_filter_effect",
"value": "Animation filter effect"
},
{
"name": "Crop_circular_effect",
"value": "Crop circular effect"
},
{
"name": "Crop_circular_with_border_effect",
"value": "Crop circular with border effect"
},
{
"name": "Contrast_effect",
"value": "Contrast effect"
},
{
"name": "Black_ink_filtering_effect",
"value": "Black ink filtering effect"
},
{
"name": "Rotate",
"value": "Rotate"
},
{
"name": "Corners",
"value": "Corners"
},
{
"name": "Kuwahara_Filter_effect",
"value": "Kuwahara filter effect"
},
{
"name": "Pixelated_Filter_effect",
"value": "Pixelated filtering effect"
},
{
"name": "Sketch_Filter_effect",
"value": "Sketch Filter effect"
},
{
"name": "Distortion_Filter_effect",
"value": "Distortion Filter effect"
},
{
"name": "Decorative_Filter_effect",
"value": "Decorative Filter effect"
},
{
"name": "Square_cutting_effect",
"value": "Square cutting effect"
},
{
"name": "Top_cutting_effect",
"value": "Top cutting effect"
},
{
"name": "Middle_cutting_effect",
"value": "Middle cutting effect"
},
{
"name": "Bottom_cutting_effect",
"value": "Bottom cutting effect"
},
{
"name": "Mask_effect",
"value": "Mask effect"
}
]
}

View File

@ -255,6 +255,110 @@
{
"name": "Click_load_Uri",
"value": "点击加载Uri并展示"
},
{
"name": "Delete_all_caches",
"value": "删除全部缓存"
},
{
"name": "Delete_all_memory_caches",
"value": "删除全部内存缓存"
},
{
"name": "Delete_all_file_caches",
"value": "删除全部文件缓存"
},
{
"name": "Delete_all_custom_memory_caches",
"value": "删除自定义内存缓存"
},
{
"name": "Delete_all_custom_file_caches",
"value": "删除自定义文件缓存"
},
{
"name": "Blur_effect",
"value": "模糊效果"
},
{
"name": "Highlighting_effect",
"value": "高亮效果"
},
{
"name": "Ashing_effect",
"value": "灰化效果"
},
{
"name": "Inverse_effect",
"value": "反转效果"
},
{
"name": "Animation_filter_effect",
"value": "动画滤镜效果"
},
{
"name": "Crop_circular_effect",
"value": "裁剪圆形效果"
},
{
"name": "Crop_circular_with_border_effect",
"value": "裁剪圆形带边框效果"
},
{
"name": "Contrast_effect",
"value": "对比度效果"
},
{
"name": "Black_ink_filtering_effect",
"value": "乌墨色滤波效果"
},
{
"name": "Rotate",
"value": "旋转效果"
},
{
"name": "Corners",
"value": "圆角效果"
},
{
"name": "Kuwahara_Filter_effect",
"value": "桑原滤波效果"
},
{
"name": "Pixelated_Filter_effect",
"value": "像素化滤波效果"
},
{
"name": "Sketch_Filter_effect",
"value": "素描滤波效果"
},
{
"name": "Distortion_Filter_effect",
"value": "扭曲滤波效果"
},
{
"name": "Decorative_Filter_effect",
"value": "装饰滤波效果"
},
{
"name": "Square_cutting_effect",
"value": "正方形裁剪效果"
},
{
"name": "Top_cutting_effect",
"value": "上方裁剪效果"
},
{
"name": "Middle_cutting_effect",
"value": "中间裁剪效果"
},
{
"name": "Bottom_cutting_effect",
"value": "底下裁剪效果"
},
{
"name": "Mask_effect",
"value": "遮罩效果"
}
]
}