Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two $templateCache(s) in the dist files, request for versioning #16

Open
vikaskonsam opened this issue Feb 9, 2017 · 1 comment
Open

Comments

@vikaskonsam
Copy link

vikaskonsam commented Feb 9, 2017

There are two $templateCache pointing to the same template path in the distribution files. I think this has happened because the source file already has a $templatecache in it. My assumption is that the template should only be injected when you the run gulp build tasks. The templateCache in the source file also does not have any reference to the form.i18n object and it looks like this is the template which was used earlier.

Also, will it be possible to use the form.i18n labels only if it exists else fallback to the modules labels or have default labels preferably in english?

Example: We already had translation defined. However, since, with the latest update, they are no longer used in the template we have been getting elements without labels only to realize later that these labels are being defined as a part of the form object.

$translateProvider.translations('en', {
        'modules.upload.dndNotSupported': 'Drag n drop not surpported by your browser',
        'modules.attribute.fields.required.caption': 'Required',
        'modules.upload.descriptionMultifile': 'Drop your file(s) here',
        'modules.upload.descriptionSinglefile': 'Drop your file here',
        'buttons.add': 'Open file browser',
        'modules.upload.field.filename': 'Filename',
        'modules.upload.field.preview': 'Preview',
        'modules.upload.multiFileUpload': 'Multifile upload',
        'modules.upload.field.progress': 'Progress',
        'buttons.upload': 'Upload'
    });

Further, form.i18n is used only for the singleFileUpload template and not in the multifileUpload template.

Also, please add release versions so that we can target specific versions which worked for us.

@vikaskonsam
Copy link
Author

Created a PR to support

  1. fallback to labels (defined using $translateprovider) if form.i18n is not available.
  2. Removed the unnecessary $templateCache definition from dist files and also from the src file
  3. Used form.i18n definition in multifileUpload template which was missing
  4. Updated readme file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant