Skip to content

Commit e0bd739

Browse files
committed
MOBILE-1701 files: Improve texts of uploader and shared files
1 parent ebb5066 commit e0bd739

File tree

5 files changed

+9
-3
lines changed

5 files changed

+9
-3
lines changed

www/core/components/fileuploader/controllers/picker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ angular.module('mm.core.fileuploader')
2222
* @name mmFileUploaderPickerCtrl
2323
*/
2424
.controller('mmFileUploaderPickerCtrl', function($scope, $mmUtil, $mmFileUploaderHelper, $ionicHistory, $mmApp, $mmFS, $q,
25-
$mmFileUploaderDelegate, $stateParams) {
25+
$mmFileUploaderDelegate, $stateParams, $translate) {
2626

2727
var maxSize = $stateParams.maxsize,
2828
upload = $stateParams.upload,
@@ -35,6 +35,7 @@ angular.module('mm.core.fileuploader')
3535

3636
$scope.isAndroid = ionic.Platform.isAndroid();
3737
$scope.handlers = $mmFileUploaderDelegate.getHandlers();
38+
$scope.title = $translate.instant(upload ? 'mm.fileuploader.uploadafile' : 'mm.fileuploader.selectafile');
3839

3940
// Function called when a file is uploaded.
4041
function successUploading(result) {

www/core/components/fileuploader/lang/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"maxbytesfile": "The file {{$a.file}} is too large. The maximum size you can upload is {{$a.size}}.",
1818
"photoalbums": "Photo albums",
1919
"readingfile": "Reading file",
20+
"selectafile": "Select a file",
2021
"uploadafile": "Upload a file",
2122
"uploading": "Uploading",
2223
"uploadingperc": "Uploading: {{$a}}%",

www/core/components/fileuploader/templates/picker.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<ion-view view-title="{{'mm.fileuploader.uploadafile' | translate}}">
1+
<ion-view view-title="{{title}}">
22
<ion-content mm-state-class>
33
<div class="list">
44
<a class="item" ng-click="upload('album', true)">

www/core/components/sharedfiles/lang/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"chooseaccountstorefile": "Choose an account to store the file in.",
44
"errorreceivefilenosites": "There are no sites stored. Please add a site before sharing a file with the app.",
55
"nosharedfiles": "There are no shared files stored in this site.",
6+
"nosharedfilestoupload": "You have no files to upload here. If you want to upload a file from another app, locate that file and click the 'Open in' button.",
67
"rename": "Rename",
78
"replace": "Replace",
89
"sharedfiles": "Shared files",

www/core/components/sharedfiles/templates/list.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@
1313
{{ file.name }}
1414
</a>
1515
</li>
16-
<li ng-if="files && !files.length" class="item">{{ 'mm.sharedfiles.nosharedfiles' | translate }}</li>
16+
<li ng-if="files && !files.length" class="item item-text-wrap">
17+
<p ng-if="manage">{{ 'mm.sharedfiles.nosharedfiles' | translate }}</p>
18+
<p ng-if="!manage">{{ 'mm.sharedfiles.nosharedfilestoupload' | translate }}</p>
19+
</li>
1720
</ul>
1821
</mm-loading>
1922
</ion-content>

0 commit comments

Comments
 (0)