summaryrefslogtreecommitdiffstats
path: root/server/tests
diff options
context:
space:
mode:
authorTeemu Suo-Anttila <teemusa@vaadin.com>2015-04-08 13:41:37 +0300
committerVaadin Code Review <review@vaadin.com>2015-04-10 12:40:00 +0000
commit3cb1cfec55f568838798a5afb5bf27b13ba82b42 (patch)
treea7792ed6ad3ecd81784d1e2b2227895ea15c177f /server/tests
parent38e35c5db6621b20929d924707be149e22032997 (diff)
downloadvaadin-framework-3cb1cfec55f568838798a5afb5bf27b13ba82b42.tar.gz
vaadin-framework-3cb1cfec55f568838798a5afb5bf27b13ba82b42.zip
Fix GridLayout declarative support (#16594)
Change-Id: I25e52a9246c9ccbc406d1f162b4e9ff69bb411ff
Diffstat (limited to 'server/tests')
-rw-r--r--server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java17
-rw-r--r--server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java200
2 files changed, 209 insertions, 8 deletions
diff --git a/server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java b/server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java
index f7dbd0c97e..83b3e577dc 100644
--- a/server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java
+++ b/server/tests/src/com/vaadin/tests/design/AbstractComponentSetResponsiveTest.java
@@ -17,21 +17,22 @@ package com.vaadin.tests.design;
import org.junit.Test;
-import com.vaadin.tests.design.DeclarativeTestBase;
-import com.vaadin.ui.GridLayout;
+import com.vaadin.shared.ui.label.ContentMode;
+import com.vaadin.ui.Label;
public class AbstractComponentSetResponsiveTest extends
- DeclarativeTestBase<GridLayout> {
+ DeclarativeTestBase<Label> {
@Test
public void testResponsiveFlag() {
- GridLayout gl = new GridLayout();
- gl.setResponsive(true);
+ Label label = new Label();
+ label.setContentMode(ContentMode.HTML);
+ label.setResponsive(true);
- String design = "<v-grid-layout responsive='true' />";
+ String design = "<v-label responsive='true' />";
- testWrite(design, gl);
- testRead(design, gl);
+ testWrite(design, label);
+ testRead(design, label);
}
}
diff --git a/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java b/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
new file mode 100644
index 0000000000..7c9c126707
--- /dev/null
+++ b/server/tests/src/com/vaadin/tests/server/component/gridlayout/GridLayoutDeclarativeTest.java
@@ -0,0 +1,200 @@
+/*
+ * Copyright 2000-2014 Vaadin Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
+ * use this file except in compliance with the License. You may obtain a copy of
+ * the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.vaadin.tests.server.component.gridlayout;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import com.vaadin.tests.design.DeclarativeTestBase;
+import com.vaadin.ui.Button;
+import com.vaadin.ui.Component;
+import com.vaadin.ui.GridLayout;
+import com.vaadin.ui.declarative.DesignContext;
+
+public class GridLayoutDeclarativeTest extends DeclarativeTestBase<GridLayout> {
+
+ @Test
+ public void testSimpleGridLayout() {
+ Button b1 = new Button("Button 0,0");
+ Button b2 = new Button("Button 0,1");
+ Button b3 = new Button("Button 1,0");
+ Button b4 = new Button("Button 1,1");
+ b1.setCaptionAsHtml(true);
+ b2.setCaptionAsHtml(true);
+ b3.setCaptionAsHtml(true);
+ b4.setCaptionAsHtml(true);
+ String design = "<v-grid-layout><row>" //
+ + "<column expand=1>" + writeChild(b1) + "</column>" //
+ + "<column expand=3>" + writeChild(b2) + "</column>" //
+ + "</row><row>" //
+ + "<column>" + writeChild(b3) + "</column>" //
+ + "<column>" + writeChild(b4) + "</column>" //
+ + "</row></v-grid-layout>";
+ GridLayout gl = new GridLayout(2, 2);
+ gl.addComponent(b1);
+ gl.addComponent(b2);
+ gl.addComponent(b3);
+ gl.addComponent(b4);
+ gl.setColumnExpandRatio(0, 1.0f);
+ gl.setColumnExpandRatio(1, 3.0f);
+ testWrite(design, gl);
+ testRead(design, gl);
+ }
+
+ @Test
+ public void testOneBigComponentGridLayout() {
+ Button b1 = new Button("Button 0,0 -> 1,1");
+ b1.setCaptionAsHtml(true);
+ String design = "<v-grid-layout><row>" //
+ + "<column colspan=2 rowspan=2>" + writeChild(b1) + "</column>" //
+ + "</row><row expand=2>" //
+ + "</row></v-grid-layout>";
+ GridLayout gl = new GridLayout(2, 2);
+ gl.addComponent(b1, 0, 0, 1, 1);
+ gl.setRowExpandRatio(1, 2);
+ testWrite(design, gl);
+ testRead(design, gl);
+ }
+
+ @Test
+ public void testMultipleSpannedComponentsGridLayout() {
+ GridLayout gl = new GridLayout(5, 5);
+ Button b1 = new Button("Button 0,0 -> 0,2");
+ b1.setCaptionAsHtml(true);
+ gl.addComponent(b1, 0, 0, 2, 0);
+
+ Button b2 = new Button("Button 0,3 -> 3,3");
+ b2.setCaptionAsHtml(true);
+ gl.addComponent(b2, 3, 0, 3, 3);
+
+ Button b3 = new Button("Button 0,4 -> 1,4");
+ b3.setCaptionAsHtml(true);
+ gl.addComponent(b3, 4, 0, 4, 1);
+
+ Button b4 = new Button("Button 1,0 -> 3,1");
+ b4.setCaptionAsHtml(true);
+ gl.addComponent(b4, 0, 1, 1, 3);
+
+ Button b5 = new Button("Button 2,2");
+ b5.setCaptionAsHtml(true);
+ gl.addComponent(b5, 2, 2);
+
+ Button b6 = new Button("Button 3,4 -> 4,4");
+ b6.setCaptionAsHtml(true);
+ gl.addComponent(b6, 4, 3, 4, 4);
+
+ Button b7 = new Button("Button 4,1 -> 4,2");
+ b7.setCaptionAsHtml(true);
+ gl.addComponent(b7, 2, 4, 3, 4);
+
+ /*
+ * Buttons in the GridLayout
+ */
+
+ // 1 1 1 2 3
+ // 4 4 - 2 3
+ // 4 4 5 2 -
+ // 4 4 - 2 6
+ // - - 7 7 6
+
+ String design = "<v-grid-layout><row>" //
+ + "<column colspan=3>" + writeChild(b1) + "</column>" //
+ + "<column rowspan=4>" + writeChild(b2) + "</column>" //
+ + "<column rowspan=2>" + writeChild(b3) + "</column>" //
+ + "</row><row>" //
+ + "<column rowspan=3 colspan=2>" + writeChild(b4) + "</column>" //
+ + "</row><row>" //
+ + "<column>" + writeChild(b5) + "</column>" //
+ + "</row><row>" //
+ + "<column />" // Empty placeholder
+ + "<column rowspan=2>" + writeChild(b6) + "</column>" //
+ + "</row><row>" //
+ + "<column colspan=2 />" // Empty placeholder
+ + "<column colspan=2>" + writeChild(b7) + "</column>" //
+ + "</row></v-grid-layout>";
+ testWrite(design, gl);
+ testRead(design, gl);
+ }
+
+ @Test
+ public void testManyExtraGridLayoutSlots() {
+ GridLayout gl = new GridLayout(5, 5);
+ Button b1 = new Button("Button 0,4 -> 4,4");
+ b1.setCaptionAsHtml(true);
+ gl.addComponent(b1, 4, 0, 4, 4);
+ gl.setColumnExpandRatio(2, 2.0f);
+
+ String design = "<v-grid-layout><row>" //
+ + "<column colspan=4 rowspan=5 expand='0,0,2,0' />" //
+ + "<column rowspan=5>" + writeChild(b1) + "</column>" //
+ + "</row><row>" //
+ + "</row><row>" //
+ + "</row><row>" //
+ + "</row><row>" //
+ + "</row></v-grid-layout>";
+ testWrite(design, gl);
+ testRead(design, gl);
+ }
+
+ @Test
+ public void testManyEmptyColumnsWithOneExpand() {
+ GridLayout gl = new GridLayout(5, 5);
+ Button b1 = new Button("Button 0,4 -> 4,4");
+ b1.setCaptionAsHtml(true);
+ gl.addComponent(b1, 0, 0, 0, 4);
+ gl.setColumnExpandRatio(4, 2.0f);
+
+ String design = "<v-grid-layout><row>" //
+ + "<column rowspan=5>" + writeChild(b1) + "</column>" //
+ + "<column colspan=4 rowspan=5 expand='0,0,0,2' />" //
+ + "</row><row>" //
+ + "</row><row>" //
+ + "</row><row>" //
+ + "</row><row>" //
+ + "</row></v-grid-layout>";
+ testWrite(design, gl);
+ testRead(design, gl);
+ }
+
+ @Test
+ public void testEmptyGridLayout() {
+ GridLayout gl = new GridLayout();
+ String design = "<v-grid-layout />";
+ testWrite(design, gl);
+ testRead(design, gl);
+ }
+
+ private String writeChild(Component childComponent) {
+ return new DesignContext().createElement(childComponent).toString();
+ }
+
+ @Override
+ public GridLayout testRead(String design, GridLayout expected) {
+ expected.setCursorX(0);
+ expected.setCursorY(expected.getRows());
+
+ GridLayout result = super.testRead(design, expected);
+ for (int row = 0; row < expected.getRows(); ++row) {
+ Assert.assertTrue(Math.abs(expected.getRowExpandRatio(row)
+ - result.getRowExpandRatio(row)) < 0.00001);
+ }
+ for (int col = 0; col < expected.getColumns(); ++col) {
+ Assert.assertTrue(Math.abs(expected.getColumnExpandRatio(col)
+ - result.getColumnExpandRatio(col)) < 0.00001);
+ }
+ return result;
+ }
+}
Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
summaryrefslogtreecommitdiffstats
path: root/l10n/fa/settings.po
blob: 20aa22599b1e5e1226bad3d5c24a4aa26a6811d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# 
# Translators:
#   <basir.jafarzadeh@gmail.com>, 2012.
# Hossein nag <h.sname@yahoo.com>, 2012.
#   <tamass4116@gmail.com>, 2012.
# vahid chakoshy <vchakoshy@gmail.com>, 2012.
msgid ""
msgstr ""
"Project-Id-Version: ownCloud\n"
"Report-Msgid-Bugs-To: http://bugs.owncloud.org/\n"
"POT-Creation-Date: 2013-01-12 00:09+0100\n"
"PO-Revision-Date: 2013-01-11 23:09+0000\n"
"Last-Translator: I Robot <owncloud-bot@tmit.eu>\n"
"Language-Team: Persian (http://www.transifex.com/projects/p/owncloud/language/fa/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: fa\n"
"Plural-Forms: nplurals=1; plural=0;\n"

#: ajax/apps/ocs.php:20
msgid "Unable to load list from App Store"
msgstr "قادر به بارگذاری لیست از فروشگاه اپ نیستم"

#: ajax/creategroup.php:10
msgid "Group already exists"
msgstr ""

#: ajax/creategroup.php:19
msgid "Unable to add group"
msgstr ""

#: ajax/enableapp.php:11
msgid "Could not enable app. "
msgstr ""

#: ajax/lostpassword.php:12
msgid "Email saved"
msgstr "ایمیل ذخیره شد"

#: ajax/lostpassword.php:14
msgid "Invalid email"
msgstr "ایمیل غیر قابل قبول"

#: ajax/removegroup.php:13
msgid "Unable to delete group"
msgstr ""

#: ajax/removeuser.php:15 ajax/setquota.php:15 ajax/togglegroups.php:18
msgid "Authentication error"
msgstr "خطا در اعتبار سنجی"

#: ajax/removeuser.php:24
msgid "Unable to delete user"
msgstr ""

#: ajax/setlanguage.php:15
msgid "Language changed"
msgstr "زبان تغییر کرد"

#: ajax/setlanguage.php:17 ajax/setlanguage.php:20
msgid "Invalid request"
msgstr "درخواست غیر قابل قبول"

#: ajax/togglegroups.php:12
msgid "Admins can't remove themself from the admin group"
msgstr ""

#: ajax/togglegroups.php:28
#, php-format
msgid "Unable to add user to group %s"
msgstr ""

#: ajax/togglegroups.php:34
#, php-format
msgid "Unable to remove user from group %s"
msgstr ""

#: js/apps.js:28 js/apps.js:67
msgid "Disable"
msgstr "غیرفعال"

#: js/apps.js:28 js/apps.js:55
msgid "Enable"
msgstr "فعال"

#: js/personal.js:69
msgid "Saving..."
msgstr "درحال ذخیره ..."

#: personal.php:42 personal.php:43
msgid "__language_name__"
msgstr "__language_name__"

#: templates/apps.php:10
msgid "Add your App"
msgstr "برنامه خود را بیافزایید"

#: templates/apps.php:11
msgid "More Apps"
msgstr ""

#: templates/apps.php:27
msgid "Select an App"
msgstr "یک برنامه انتخاب کنید"

#: templates/apps.php:31
msgid "See application page at apps.owncloud.com"
msgstr "صفحه این اٌپ را در apps.owncloud.com ببینید"

#: templates/apps.php:32
msgid "<span class=\"licence\"></span>-licensed by <span class=\"author\"></span>"
msgstr ""

#: templates/help.php:3
msgid "User Documentation"
msgstr ""

#: templates/help.php:4
msgid "Administrator Documentation"
msgstr ""

#: templates/help.php:6
msgid "Online Documentation"
msgstr ""

#: templates/help.php:7
msgid "Forum"
msgstr ""

#: templates/help.php:9
msgid "Bugtracker"
msgstr ""

#: templates/help.php:11
msgid "Commercial Support"
msgstr ""

#: templates/personal.php:8
#, php-format
msgid "You have used <strong>%s</strong> of the available <strong>%s</strong>"
msgstr ""

#: templates/personal.php:12
msgid "Clients"
msgstr "مشتریان"

#: templates/personal.php:13
msgid "Download Desktop Clients"
msgstr ""

#: templates/personal.php:14
msgid "Download Android Client"
msgstr ""

#: templates/personal.php:15
msgid "Download iOS Client"
msgstr ""

#: templates/personal.php:21 templates/users.php:23 templates/users.php:82
msgid "Password"
msgstr "گذرواژه"

#: templates/personal.php:22
msgid "Your password was changed"
msgstr "رمز عبور شما تغییر یافت"

#: templates/personal.php:23
msgid "Unable to change your password"
msgstr "ناتوان در تغییر گذرواژه"

#: templates/personal.php:24
msgid "Current password"
msgstr "گذرواژه کنونی"

#: templates/personal.php:25
msgid "New password"
msgstr "گذرواژه جدید"

#: templates/personal.php:26
msgid "show"
msgstr "نمایش"

#: templates/personal.php:27
msgid "Change password"
msgstr "تغییر گذر واژه"

#: templates/personal.php:33
msgid "Email"
msgstr "پست الکترونیکی"

#: templates/personal.php:34
msgid "Your email address"
msgstr "پست الکترونیکی شما"

#: templates/personal.php:35
msgid "Fill in an email address to enable password recovery"
msgstr "پست الکترونیکی را پرکنید  تا بازیابی گذرواژه فعال شود"

#: templates/personal.php:41 templates/personal.php:42
msgid "Language"
msgstr "زبان"

#: templates/personal.php:47
msgid "Help translate"
msgstr "به ترجمه آن کمک کنید"

#: templates/personal.php:52
msgid "WebDAV"
msgstr ""

#: templates/personal.php:54
msgid "Use this address to connect to your ownCloud in your file manager"
msgstr ""

#: templates/personal.php:63
msgid "Version"
msgstr ""

#: templates/personal.php:65
msgid ""
"Developed by the <a href=\"http://ownCloud.org/contact\" "
"target=\"_blank\">ownCloud community</a>, the <a "
"href=\"https://github.com/owncloud\" target=\"_blank\">source code</a> is "
"licensed under the <a href=\"http://www.gnu.org/licenses/agpl-3.0.html\" "
"target=\"_blank\"><abbr title=\"Affero General Public "
"License\">AGPL</abbr></a>."
msgstr ""

#: templates/users.php:21 templates/users.php:81
msgid "Name"
msgstr "نام"

#: templates/users.php:26 templates/users.php:83 templates/users.php:103
msgid "Groups"
msgstr "گروه ها"

#: templates/users.php:32
msgid "Create"
msgstr "ایجاد کردن"

#: templates/users.php:35
msgid "Default Storage"
msgstr ""

#: templates/users.php:42 templates/users.php:138
msgid "Unlimited"
msgstr ""

#: templates/users.php:60 templates/users.php:153
msgid "Other"
msgstr "سایر"

#: templates/users.php:85 templates/users.php:117
msgid "Group Admin"
msgstr ""

#: templates/users.php:87
msgid "Storage"
msgstr ""

#: templates/users.php:133
msgid "Default"
msgstr ""

#: templates/users.php:161
msgid "Delete"
msgstr "پاک کردن"