You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2020/12/11 18:20:04 UTC

[GitHub] [incubator-superset] betodealmeida commented on a change in pull request #11983: feat: add confirmation dialog for imports

betodealmeida commented on a change in pull request #11983:
URL: https://github.com/apache/incubator-superset/pull/11983#discussion_r541138928



##########
File path: superset-frontend/src/views/CRUD/chart/ChartList.tsx
##########
@@ -581,6 +581,9 @@ function ChartList(props: ChartListProps) {
             'the database configuration are not present in export files, and ' +
             'should be added manually after the import if they are needed.',
         )}
+        confirmOverwriteMessage={t(
+          'One or more charts to be imported already exist.',

Review comment:
       The problem is that we need to use plural here ("charts") and `resourceLabel` is singular, and we can't build the plural programmatically. For example, we could try to do this:
   
   ```javascript
   t('One or more %ss to be imported already exist.', resourceLabel);
   ```
   
   But in Italian (eg) the plural of chart — grafico — is "grafici", and it would break.
   
   We could change the constructor to receive `resourceName` and `resourcePluralName`, but I thought it would be better to have components define the error message, since it allows for customization.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org