~pkunal-parmar/ubuntu-calendar-app/ICalImport

« back to all changes in this revision

Viewing changes to Defines.js

  • Committer: Launchpad Translations on behalf of ubuntu-calendar-dev
  • Date: 2013-08-30 05:25:11 UTC
  • Revision ID: launchpad_translations_on_behalf_of_ubuntu-calendar-dev-20130830052511-yvisk7eao427cp9w
Launchpad automatic translations update.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
 * Copyright (C) 2013-2014 Canonical Ltd
3
 
 *
4
 
 * This file is part of Ubuntu Calendar App
5
 
 *
6
 
 * Ubuntu Calendar App is free software: you can redistribute it and/or modify
7
 
 * it under the terms of the GNU General Public License version 3 as
8
 
 * published by the Free Software Foundation.
9
 
 *
10
 
 * Ubuntu Calendar App is distributed in the hope that it will be useful,
11
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13
 
 * GNU General Public License for more details.
14
 
 *
15
 
 * You should have received a copy of the GNU General Public License
16
 
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
 
 */
18
 
.pragma library
19
 
 
20
 
.import QtOrganizer 5.0 as QtPim
21
 
 
22
 
var recurrenceLabel = getRecurrenceLabels();
23
 
var weekLabel = getWeekLabels();
24
 
// It contains multiple weekly entries to handle following occurence
25
 
//1.Every Weekday (Monday to Friday
26
 
//2.Every Monday, Wednesday and Friday
27
 
//3.Every Tuesday and Thursday
28
 
//4.Weekly
29
 
var recurrenceValue = [ QtPim.RecurrenceRule.Invalid,
30
 
    QtPim.RecurrenceRule.Daily,
31
 
    QtPim.RecurrenceRule.Weekly,
32
 
    QtPim.RecurrenceRule.Weekly,
33
 
    QtPim.RecurrenceRule.Weekly,
34
 
    QtPim.RecurrenceRule.Weekly,
35
 
    QtPim.RecurrenceRule.Monthly,
36
 
    QtPim.RecurrenceRule.Yearly];
37
 
 
38
 
function getRecurrenceLabels() {
39
 
    var component = Qt.createComponent(Qt.resolvedUrl("RecurrenceLabelDefines.qml"));
40
 
    var object = component.createObject(Qt.application);
41
 
    return object.recurrenceLabel;
42
 
}
43
 
 
44
 
function getWeekLabels(){
45
 
    var object = Qt.createQmlObject('\
46
 
        import QtQuick 2.3;\
47
 
        import Ubuntu.Components 1.1;\
48
 
        QtObject {\
49
 
            property var weekLabel:[Qt.locale().dayName(7,Locale.NarrowFormat),\
50
 
                                    Qt.locale().dayName(1,Locale.NarrowFormat),\
51
 
                                    Qt.locale().dayName(2,Locale.NarrowFormat),\
52
 
                                    Qt.locale().dayName(3,Locale.NarrowFormat),\
53
 
                                    Qt.locale().dayName(4,Locale.NarrowFormat),\
54
 
                                    Qt.locale().dayName(5,Locale.NarrowFormat),\
55
 
                                    Qt.locale().dayName(6,Locale.NarrowFormat)];}', Qt.application, 'weekLabelObj');
56
 
    return object.weekLabel;
57
 
}