fix: 把结果显示为双语格式

This commit is contained in:
Zhicheng WANG 2021-02-18 09:21:46 +08:00
parent 06030e128e
commit 71ab685063
2 changed files with 6 additions and 2 deletions

View File

@ -16,8 +16,10 @@
<div class="c-resource">
<a class="l-flex--column resource-row-link" rel="noopener" target="_blank" [href]="resource.url">
<div>
<h4>{{resource.title}}</h4>
<p class="resource-description">{{resource.desc || 'No Description'}}</p>
<h4 translation-result="on">{{resource.titleCn || resource.title}}</h4>
<h4 translation-origin="off">{{resource.title}}</h4>
<p translation-result="on" class="resource-description">{{resource.descCn || resource.desc || '无描述'}}</p>
<p translation-origin="off" class="resource-description">{{resource.desc || 'No Description'}}</p>
</div>
</a>
</div>

View File

@ -17,6 +17,8 @@ export interface Resource {
subCategory: string; // "Books"
id: string; // "-KLI8vJ0ZkvWhqPembZ7"
desc: string; // "This books shows all the steps necessary for the development of SPA"
descCn: string; // "This books shows all the steps necessary for the development of SPA"
title: string; // "Practical Angular 2",
titleCn: string; // "Practical Angular 2",
url: string; // "https://leanpub.com/practical-angular-2"
}