11// @flow
2- import { Trans } from '@lingui/macro' ;
2+ import { t , Trans } from '@lingui/macro' ;
33import { type I18n as I18nType } from '@lingui/core' ;
44
55import * as React from 'react' ;
@@ -29,6 +29,7 @@ type Props = {|
2929 resources : Array < gdResource > ,
3030 onResourcePathUpdated : ( ) => void ,
3131 resourceManagementProps : ResourceManagementProps ,
32+ i18n : I18nType ,
3233| } ;
3334
3435export type ResourcePropertiesEditorInterface = { | forceUpdate : ( ) => void | } ;
@@ -56,6 +57,7 @@ const ResourcePropertiesEditor: React.ComponentType<{
5657 resources,
5758 onResourcePathUpdated,
5859 resourceManagementProps,
60+ i18n,
5961 } ,
6062 ref
6163 ) => {
@@ -125,15 +127,15 @@ const ResourcePropertiesEditor: React.ComponentType<{
125127 const schema : Schema = React . useMemo (
126128 ( ) => [
127129 {
128- name : ' Resource name' ,
130+ name : i18n . _ ( t ` Resource name` ) ,
129131 valueType : 'string' ,
130132 disabled : ( ) => true ,
131133 getValue : ( resource : gdResource ) => resource . getName ( ) ,
132134 setValue : ( resource : gdResource , newValue : string ) =>
133135 resource . setName ( newValue ) ,
134136 } ,
135137 {
136- name : ' File' ,
138+ name : i18n . _ ( t ` File` ) ,
137139 valueType : 'string' ,
138140 getValue : ( resource : gdResource ) => resource . getFile ( ) ,
139141 setValue : ( resource : gdResource , newValue : string ) => {
@@ -156,7 +158,7 @@ const ResourcePropertiesEditor: React.ComponentType<{
156158 : undefined ,
157159 } ,
158160 ] ,
159- [ resourceSources , chooseResourcePath ]
161+ [ resourceSources , chooseResourcePath , i18n ]
160162 ) ;
161163
162164 const renderResourcesProperties = React . useCallback (
0 commit comments