Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
sking  
#1 Posted : Tuesday, August 30, 2016 5:21:45 AM(UTC)
sking

Rank: Newbie

Groups: Member
Joined: 8/16/2010(UTC)
Posts: 7

Hi all

Based on 8.5.55 version of Upload Suite, specifcially in IE11, I have noticed something

In the localization files, for EN, as it is default, if I modify this file directly and change

maxFileSizeExceeded: "The file '[name]' cannot be selected. This file size exceeds the limit.",

to

maxFileSizeExceeded: "Something '[name]' cannot be selected. This file size exceeds the limit.",


When I re-visit the web page, having already removed the ocx file from C:\Windows\Downloaded Program Files - the change above is not being reflected, it still says "The file '[name]' cannot be selected. This file size exceeds the limit." instead of my expected change

Any thoughts?

Andrew  
#2 Posted : Friday, September 02, 2016 12:07:31 AM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 865

Thanks: 2 times
Was thanked: 25 time(s) in 25 post(s)
Do you apply the localization file as explained ?

Note, if you just change the content of the aurigma.uploader.en_localization.js file, it won't automatically reflect the changes. You should:

1. Link the localization file to your page:

Code:
<script src="aur8.5.55/aurigma.uploader.en_localization.js" type="text/javascript"></script>


This scripts imports the en_localization object with all string values (in the scope of the window).

2. Apply these strings by calling this code after the uploader is initialized:

Code:

var uploader = $au.uploader('your_uploader_id');
uploader.set(en_localization);


If you still have any problems, please post your code with the uploader settings.

Edited by user Friday, September 02, 2016 12:09:26 AM(UTC)  | Reason: Not specified

sking  
#3 Posted : Monday, September 05, 2016 5:52:53 AM(UTC)
sking

Rank: Newbie

Groups: Member
Joined: 8/16/2010(UTC)
Posts: 7

Hi Andrew

Yes I am referencing the localisation files as per your sample above - however I am not setting the locale as per your second sample - I am wondering why would that be necessary, since the uploader is already showing English text strings

Also I attempted to do the following:

messages:{
maxFileSizeExceeded: 'Sample new message'
}


But that does not seem to work either

Edited by user Monday, September 05, 2016 6:15:05 AM(UTC)  | Reason: Not specified

Andrew  
#4 Posted : Wednesday, September 14, 2016 10:49:11 PM(UTC)
Andrew

Rank: Advanced Member

Groups: Member, Administration
Joined: 8/2/2003(UTC)
Posts: 865

Thanks: 2 times
Was thanked: 25 time(s) in 25 post(s)
Hi Peter,

ActiveX control has its own default values within the .ocx file. They are the same as in the en.js file. However, they are not automatically loaded from the en.js file - if you change the default texts, you have to apply the en.js explicitly.

In fact, the uploader.set(en_localization) line is a shortcode for a manual modification of all text strings. The en_localization object is a JSON with all text related params, so it is the same as if you create the uploader like this:

Code:
var upldr = $au.uploader(    
     // ... 
     addFilesProgressDialog: {
        text: "Adding files to upload list..."
    },
    commonDialog: {
        cancelButtonText: "Cancel",
        okButtonText: "OK"
    },
    descriptionEditor: {
        cancelButtonText: "Cancel",
        saveButtonText: "Save"
    },
    imagePreviewWindow: {
        closePreviewTooltip: "Click to close"
    },
    messages: {
        cannotReadFile: "Cannot read file: {0}.",
        dimensionsTooLarge: "Dimensions of '{0}' are too large, the file wasn't added. Maximum allowed image dimensions are {1}x{2} pixels.",
        dimensionsTooSmall: "Dimensions of '{0}' are too small, the file wasn't added. Minimum allowed image dimensions are {1}x{2} pixels.",
        fileNameNotAllowed: "The file '{0}' cannot be added. This file has inadmissible name.",
		fileSizeTooSmall: "Size of '{0}' is too small to be added. Minimum allowed size is {1}.",
        filesNotAdded: "{0} files were not added due to restrictions of the site.",
        maxFileCountExceeded: "Not all files were added. You allowed to upload no more than {0} file(s).",
        maxFileSizeExceeded: "Size of '{0}' is too large to be added. Maximum allowed size is {1}.",
        maxTotalFileSizeExceeded: "Not all files were added. Maximum total file size ({0}) was exceeded.",
        previewNotAvailable: "Preview is not available",
        tooFewFiles: "At least {0} files should be selected to start upload."
    },
    // etc
);


I have just tried to apply the following settings:

Code:

// ...
      restrictions: {
	maxFileSize: 1000,
      },
      messages: {
        maxFileSizeExceeded: "Something '[name]' cannot be selected. This file size exceeds the limit.",
      },
// ...


Whenever I try to select a file, it shows the Something '1.jpg' cannot be selected. This file size exceeds the limit.. So if you still cannot change the text, please post here a full snippet with params so that I could try to reproduce the problem.
sking  
#5 Posted : Thursday, September 15, 2016 12:22:50 AM(UTC)
sking

Rank: Newbie

Groups: Member
Joined: 8/16/2010(UTC)
Posts: 7

Hi Andrew - all is good now :) much appreciated for all the help
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.