Merge lp:~vtuson/telegram-app/libqtelegram_bug1379417 into lp:telegram-app/trunk

Proposed by Victor Tuson Palau
Status: Merged
Merge reported by: Michał Karnicki
Merged at revision: not available
Proposed branch: lp:~vtuson/telegram-app/libqtelegram_bug1379417
Merge into: lp:telegram-app/trunk
Diff against target: 8811 lines (+8276/-0) (has conflicts)
85 files modified
.bzrignore (+20/-0)
CMakeLists.txt (+158/-0)
LICENSE (+674/-0)
README.md (+195/-0)
README.translations (+35/-0)
apparmor-push.json (+7/-0)
apparmor-telegram.json (+11/-0)
bootstrap.sh (+55/-0)
build.sh (+23/-0)
clean.sh (+8/-0)
click.sh (+52/-0)
components/CMakeLists.txt (+9/-0)
components/ContactImport.qml (+111/-0)
components/PageLoader.qml (+13/-0)
components/PictureImport.qml (+110/-0)
components/SentPhraseBubble.qml (+41/-0)
components/TelegramBubble.qml (+16/-0)
components/TelegramButton.qml (+47/-0)
components/TelegramColors.js (+21/-0)
components/TelegramContactsListItem.qml (+92/-0)
components/TelegramDelegate.qml (+196/-0)
components/TelegramDialogsListItem.qml (+216/-0)
components/TelegramHeader.qml (+79/-0)
components/TelegramLabel.qml (+10/-0)
components/TelegramPage.qml (+100/-0)
components/TelegramSection.qml (+29/-0)
components/TgButton.qml (+10/-0)
components/TgLabel.qml (+11/-0)
components/TgTextField.qml (+10/-0)
components/country_data.js (+6/-0)
components/iso_3166_2_countries.csv (+269/-0)
components/listitems/CMakeLists.txt (+7/-0)
components/listitems/DlgItem.qml (+15/-0)
components/listitems/DlgItemDesign.qml (+226/-0)
components/listitems/IconVisual.qml (+52/-0)
components/listitems/ImageWithFallback.qml (+46/-0)
components/listitems/LabelVisual.qml (+38/-0)
components/listitems/ProgressionVisual.qml (+52/-0)
countries.py (+52/-0)
debug.md (+110/-0)
images/conversation_incoming@27.sci (+5/-0)
images/conversation_outgoing@27.sci (+5/-0)
images/telegram.svg (+198/-0)
images/telegram_symbolic.svg (+192/-0)
js/avatar.js (+21/-0)
js/ba-linkify.js (+211/-0)
js/time.js (+44/-0)
manifest.json.in (+20/-0)
po/CMakeLists.txt (+29/-0)
po/ca.po (+403/-0)
po/com.ubuntu.telegram.pot (+400/-0)
po/es.po (+392/-0)
push.json (+4/-0)
push.py.in (+40/-0)
run.sh (+40/-0)
scripts/applog.sh (+16/-0)
scripts/inspect-db.sh (+11/-0)
scripts/pid.sh (+3/-0)
scripts/rm-config.sh (+3/-0)
scripts/rm-database.sh (+8/-0)
scripts/show-config.sh (+6/-0)
scripts/unity8log.sh (+3/-0)
telegram.desktop.in.in (+12/-0)
telegram.in (+3/-0)
telegram.pub (+9/-0)
telegram.qml (+434/-0)
tests/autopilot/run (+11/-0)
tests/autopilot/uitest/__init__.py (+71/-0)
tests/autopilot/uitest/test_main.py (+24/-0)
tests/unit/tst_hellocomponent.qml (+49/-0)
tools/enter-lxc.sh (+10/-0)
tools/extract_suppressions.sh (+57/-0)
ui/AddContactPage.qml (+259/-0)
ui/CMakeLists.txt (+7/-0)
ui/ContactsPage.qml (+404/-0)
ui/DialogPage.qml (+396/-0)
ui/DialogsPage.qml (+153/-0)
ui/IntroPage.qml (+134/-0)
ui/IntroPageListModel.qml (+32/-0)
ui/PreviewPage.qml (+38/-0)
ui/ProfilePage.qml (+189/-0)
ui/SettingsPage.qml (+165/-0)
ui/SignInPage.qml (+206/-0)
ui/SignUpPage.qml (+124/-0)
ui/VerificationCodePage.qml (+203/-0)
Conflict adding file .bzrignore.  Moved existing file to .bzrignore.moved.
Conflict adding file CMakeLists.txt.  Moved existing file to CMakeLists.txt.moved.
Conflict adding file LICENSE.  Moved existing file to LICENSE.moved.
Conflict adding file build.sh.  Moved existing file to build.sh.moved.
Conflict adding file run.sh.  Moved existing file to run.sh.moved.
Conflict adding file tests.  Moved existing file to tests.moved.
To merge this branch: bzr merge lp:~vtuson/telegram-app/libqtelegram_bug1379417
Reviewer Review Type Date Requested Status
Michał Karnicki Pending
Review via email: mp+238058@code.launchpad.net

Description of the change

separated the mouse area from the picture so it covers a sourranding area, also moved the picture to the left, as I think most of the problem is the right edge eating the mouse events.

To post a comment you must log in.
Revision history for this message
Michał Karnicki (karni) wrote :

I know this is old, just doing clean-up.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2014-10-11 18:44:23 +0000
@@ -0,0 +1,20 @@
1build
2click
3*.click
4library
5CMakeLists.txt.user
6telegram.qmlproject.user
7manifest.json
8telegram.desktop
9schema.sql
10js/version.js
11push.py
12Makefile
13CMakeFiles
14*.gmo
15CMakeCache.txt
16cmake_install.cmake
17third_party
18*.desktop.in.in.h
19install_manifest.txt
20ignore
021
=== renamed file '.bzrignore' => '.bzrignore.moved'
=== added file '.excludes'
=== added file 'CMakeLists.txt'
--- CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ CMakeLists.txt 2014-10-11 18:44:23 +0000
@@ -0,0 +1,158 @@
1project(com.ubuntu.telegram CXX)
2cmake_minimum_required(VERSION 2.8.10)
3find_program(INTLTOOL_MERGE intltool-merge)
4if(NOT INTLTOOL_MERGE)
5 message(FATAL_ERROR "Could not find intltool-merge, please install the intltool package")
6endif()
7find_program(INTLTOOL_EXTRACT intltool-extract)
8if(NOT INTLTOOL_EXTRACT)
9 message(FATAL_ERROR "Could not find intltool-extract, please install the intltool package")
10endif()
11
12# For now, treat this as QML project. We may leverage "ClickApp" project later.
13#set(UBUNTU_PROJECT_TYPE "ClickApp" CACHE INTERNAL "Tells QtCreator this is a Click application project")
14
15option(CLICK_MODE "Installs to a contained location" on)
16
17# TODO set BZR_SOURCE
18
19# Sets BZR_REVNO
20execute_process(
21 COMMAND bzr revno ${CMAKE_SOURCE_DIR}
22 OUTPUT_VARIABLE BZR_REVNO
23 OUTPUT_STRIP_TRAILING_WHITESPACE
24)
25# Sets VERSION_TAG
26execute_process(
27 COMMAND bzr tags -d ${CMAKE_SOURCE_DIR}
28 COMMAND tail -n1
29 COMMAND tr -s " "
30 COMMAND cut -d " " -f1
31 OUTPUT_VARIABLE VERSION_TAG
32 OUTPUT_STRIP_TRAILING_WHITESPACE
33)
34# Sets VERSION_REV
35execute_process(
36 COMMAND bzr tags -d ${CMAKE_SOURCE_DIR}
37 COMMAND tail -n1
38 COMMAND tr -s " "
39 COMMAND cut -d " " -f2
40 OUTPUT_VARIABLE VERSION_REV
41 OUTPUT_STRIP_TRAILING_WHITESPACE
42)
43
44set(APP_NAME "telegram")
45set(APP_PACKAGE "com.ubuntu.${APP_NAME}")
46set(APP_TITLE "Telegram")
47# Semantic versioning.
48set(APP_VERSION "${VERSION_TAG}.${VERSION_REV}")
49
50execute_process(
51 COMMAND echo "var version = \"${APP_VERSION}\";"
52 COMMAND tee "${CMAKE_SOURCE_DIR}/js/version.js"
53)
54
55configure_file(
56 ${CMAKE_CURRENT_SOURCE_DIR}/push.py.in
57 ${CMAKE_CURRENT_SOURCE_DIR}/push.py
58)
59
60message("-- app version: ${APP_VERSION}")
61set(APP_ICON "images/telegram.png")
62set(APP_SYMBOLIC_ICON "images/telegram_symbolic.svg")
63
64execute_process(
65 COMMAND dpkg-architecture -qDEB_HOST_ARCH
66 OUTPUT_VARIABLE ARCH
67 OUTPUT_STRIP_TRAILING_WHITESPACE
68)
69execute_process(
70 COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
71 OUTPUT_VARIABLE ARCH_TRIPLET
72 OUTPUT_STRIP_TRAILING_WHITESPACE
73)
74
75set(ARCHITECTURE "${ARCH}")
76set(FRAMEWORK "ubuntu-sdk-14.10-dev2")
77
78set(MAIN_QML "${APP_NAME}.qml")
79set(DESKTOP_FILE "${APP_NAME}.desktop")
80set(URLS_FILE "${APP_NAME}.url-dispatcher")
81
82include(GNUInstallDirs)
83find_package(Qt5Core)
84find_package(Qt5Qml)
85find_package(Qt5Quick)
86
87set(CMAKE_AUTOMOC ON)
88
89set(QT_IMPORTS_DIR "lib/${ARCH_TRIPLET}")
90
91if(CLICK_MODE)
92 if(NOT DEFINED BZR_SOURCE)
93 set(BZR_SOURCE "lp:telegram-app")
94 message("-- Setting BZR_SOURCE to ${BZR_SOURCE}")
95 endif(NOT DEFINED BZR_SOURCE)
96
97 STRING(REPLACE "/usr/" "/" QT_IMPORTS_DIR ${QT_IMPORTS_DIR})
98 set(CMAKE_INSTALL_PREFIX /)
99 set(CMAKE_INSTALL_BINDIR /)
100 set(DATA_DIR .)
101 set(EXEC "qmlscene $@ ${MAIN_QML}")
102 set(DESKTOP_DIR ${CMAKE_INSTALL_PREFIX})
103# set(URLS_DIR ${CMAKE_INSTALL_PREFIX})
104else()
105 set(DATA_DIR ${CMAKE_INSTALL_FULL_DATADIR}/${APP_NAME})
106 configure_file(${APP_NAME}.in
107 ${CMAKE_CURRENT_BINARY_DIR}/${APP_NAME})
108 install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${APP_NAME}
109 DESTINATION ${CMAKE_INSTALL_BINDIR})
110 set(EXEC ${APP_NAME})
111 set(DESKTOP_DIR ${CMAKE_INSTALL_FULL_DATADIR}/applications)
112# set(URLS_DIR ${CMAKE_INSTALL_DATADIR}/url-dispatcher/urls)
113endif()
114
115set(ICON ${DATA_DIR}/${APP_ICON})
116set(SYMBOLIC_ICON ${DATA_DIR}/${APP_SYMBOLIC_ICON})
117
118configure_file(
119 ${CMAKE_CURRENT_SOURCE_DIR}/manifest.json.in
120 ${CMAKE_CURRENT_SOURCE_DIR}/manifest.json
121)
122
123file(GLOB_RECURSE I18N_SRC_FILES
124 RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/po
125 *.qml *.js *.cpp *.h)
126list(APPEND I18N_SRC_FILES ${DESKTOP_FILE}.in.in.h)
127list(SORT I18N_SRC_FILES)
128
129configure_file(${DESKTOP_FILE}.in.in ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE}.in)
130
131add_custom_target(${DESKTOP_FILE} ALL
132 COMMENT "Merging translations into ${DESKTOP_FILE}"
133 COMMAND LC_ALL=C ${INTLTOOL_MERGE} -d -u ${CMAKE_SOURCE_DIR}/po ${DESKTOP_FILE}.in ${DESKTOP_FILE} > /dev/null
134)
135install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${DESKTOP_FILE} DESTINATION ${DESKTOP_DIR})
136
137#install(
138# FILES ${URLS_FILE}
139# DESTINATION ${URLS_DIR}
140#)
141install(FILES manifest.json DESTINATION ${CMAKE_INSTALL_PREFIX})
142install(FILES "apparmor-telegram.json" DESTINATION ${DATA_DIR})
143install(FILES "push.json" DESTINATION ${DATA_DIR})
144install(FILES "apparmor-push.json" DESTINATION ${DATA_DIR})
145install(FILES "push.py" DESTINATION ${DATA_DIR})
146install(FILES "telegram.qml" DESTINATION ${DATA_DIR})
147install(FILES "telegram.pub" DESTINATION ${DATA_DIR})
148install(DIRECTORY "assets" DESTINATION ${DATA_DIR})
149install(DIRECTORY "images" DESTINATION ${DATA_DIR})
150install(DIRECTORY "ui" DESTINATION ${DATA_DIR})
151install(DIRECTORY "js" DESTINATION ${DATA_DIR})
152
153# Ensure all source files appear in QtCreator's UI
154add_subdirectory(library)
155add_subdirectory(components)
156add_subdirectory(po)
157file(GLOB QML_JS_FILES *.qml *.js ui/*.qml js/*.js)
158add_custom_target(QML_JS_TARGET ALL SOURCES ${QML_JS_FILES})
0159
=== renamed file 'CMakeLists.txt' => 'CMakeLists.txt.moved'
=== added file 'LICENSE'
--- LICENSE 1970-01-01 00:00:00 +0000
+++ LICENSE 2014-10-11 18:44:23 +0000
@@ -0,0 +1,674 @@
1 GNU GENERAL PUBLIC LICENSE
2 Version 3, 29 June 2007
3
4 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
5 Everyone is permitted to copy and distribute verbatim copies
6 of this license document, but changing it is not allowed.
7
8 Preamble
9
10 The GNU General Public License is a free, copyleft license for
11software and other kinds of works.
12
13 The licenses for most software and other practical works are designed
14to take away your freedom to share and change the works. By contrast,
15the GNU General Public License is intended to guarantee your freedom to
16share and change all versions of a program--to make sure it remains free
17software for all its users. We, the Free Software Foundation, use the
18GNU General Public License for most of our software; it applies also to
19any other work released this way by its authors. You can apply it to
20your programs, too.
21
22 When we speak of free software, we are referring to freedom, not
23price. Our General Public Licenses are designed to make sure that you
24have the freedom to distribute copies of free software (and charge for
25them if you wish), that you receive source code or can get it if you
26want it, that you can change the software or use pieces of it in new
27free programs, and that you know you can do these things.
28
29 To protect your rights, we need to prevent others from denying you
30these rights or asking you to surrender the rights. Therefore, you have
31certain responsibilities if you distribute copies of the software, or if
32you modify it: responsibilities to respect the freedom of others.
33
34 For example, if you distribute copies of such a program, whether
35gratis or for a fee, you must pass on to the recipients the same
36freedoms that you received. You must make sure that they, too, receive
37or can get the source code. And you must show them these terms so they
38know their rights.
39
40 Developers that use the GNU GPL protect your rights with two steps:
41(1) assert copyright on the software, and (2) offer you this License
42giving you legal permission to copy, distribute and/or modify it.
43
44 For the developers' and authors' protection, the GPL clearly explains
45that there is no warranty for this free software. For both users' and
46authors' sake, the GPL requires that modified versions be marked as
47changed, so that their problems will not be attributed erroneously to
48authors of previous versions.
49
50 Some devices are designed to deny users access to install or run
51modified versions of the software inside them, although the manufacturer
52can do so. This is fundamentally incompatible with the aim of
53protecting users' freedom to change the software. The systematic
54pattern of such abuse occurs in the area of products for individuals to
55use, which is precisely where it is most unacceptable. Therefore, we
56have designed this version of the GPL to prohibit the practice for those
57products. If such problems arise substantially in other domains, we
58stand ready to extend this provision to those domains in future versions
59of the GPL, as needed to protect the freedom of users.
60
61 Finally, every program is threatened constantly by software patents.
62States should not allow patents to restrict development and use of
63software on general-purpose computers, but in those that do, we wish to
64avoid the special danger that patents applied to a free program could
65make it effectively proprietary. To prevent this, the GPL assures that
66patents cannot be used to render the program non-free.
67
68 The precise terms and conditions for copying, distribution and
69modification follow.
70
71 TERMS AND CONDITIONS
72
73 0. Definitions.
74
75 "This License" refers to version 3 of the GNU General Public License.
76
77 "Copyright" also means copyright-like laws that apply to other kinds of
78works, such as semiconductor masks.
79
80 "The Program" refers to any copyrightable work licensed under this
81License. Each licensee is addressed as "you". "Licensees" and
82"recipients" may be individuals or organizations.
83
84 To "modify" a work means to copy from or adapt all or part of the work
85in a fashion requiring copyright permission, other than the making of an
86exact copy. The resulting work is called a "modified version" of the
87earlier work or a work "based on" the earlier work.
88
89 A "covered work" means either the unmodified Program or a work based
90on the Program.
91
92 To "propagate" a work means to do anything with it that, without
93permission, would make you directly or secondarily liable for
94infringement under applicable copyright law, except executing it on a
95computer or modifying a private copy. Propagation includes copying,
96distribution (with or without modification), making available to the
97public, and in some countries other activities as well.
98
99 To "convey" a work means any kind of propagation that enables other
100parties to make or receive copies. Mere interaction with a user through
101a computer network, with no transfer of a copy, is not conveying.
102
103 An interactive user interface displays "Appropriate Legal Notices"
104to the extent that it includes a convenient and prominently visible
105feature that (1) displays an appropriate copyright notice, and (2)
106tells the user that there is no warranty for the work (except to the
107extent that warranties are provided), that licensees may convey the
108work under this License, and how to view a copy of this License. If
109the interface presents a list of user commands or options, such as a
110menu, a prominent item in the list meets this criterion.
111
112 1. Source Code.
113
114 The "source code" for a work means the preferred form of the work
115for making modifications to it. "Object code" means any non-source
116form of a work.
117
118 A "Standard Interface" means an interface that either is an official
119standard defined by a recognized standards body, or, in the case of
120interfaces specified for a particular programming language, one that
121is widely used among developers working in that language.
122
123 The "System Libraries" of an executable work include anything, other
124than the work as a whole, that (a) is included in the normal form of
125packaging a Major Component, but which is not part of that Major
126Component, and (b) serves only to enable use of the work with that
127Major Component, or to implement a Standard Interface for which an
128implementation is available to the public in source code form. A
129"Major Component", in this context, means a major essential component
130(kernel, window system, and so on) of the specific operating system
131(if any) on which the executable work runs, or a compiler used to
132produce the work, or an object code interpreter used to run it.
133
134 The "Corresponding Source" for a work in object code form means all
135the source code needed to generate, install, and (for an executable
136work) run the object code and to modify the work, including scripts to
137control those activities. However, it does not include the work's
138System Libraries, or general-purpose tools or generally available free
139programs which are used unmodified in performing those activities but
140which are not part of the work. For example, Corresponding Source
141includes interface definition files associated with source files for
142the work, and the source code for shared libraries and dynamically
143linked subprograms that the work is specifically designed to require,
144such as by intimate data communication or control flow between those
145subprograms and other parts of the work.
146
147 The Corresponding Source need not include anything that users
148can regenerate automatically from other parts of the Corresponding
149Source.
150
151 The Corresponding Source for a work in source code form is that
152same work.
153
154 2. Basic Permissions.
155
156 All rights granted under this License are granted for the term of
157copyright on the Program, and are irrevocable provided the stated
158conditions are met. This License explicitly affirms your unlimited
159permission to run the unmodified Program. The output from running a
160covered work is covered by this License only if the output, given its
161content, constitutes a covered work. This License acknowledges your
162rights of fair use or other equivalent, as provided by copyright law.
163
164 You may make, run and propagate covered works that you do not
165convey, without conditions so long as your license otherwise remains
166in force. You may convey covered works to others for the sole purpose
167of having them make modifications exclusively for you, or provide you
168with facilities for running those works, provided that you comply with
169the terms of this License in conveying all material for which you do
170not control copyright. Those thus making or running the covered works
171for you must do so exclusively on your behalf, under your direction
172and control, on terms that prohibit them from making any copies of
173your copyrighted material outside their relationship with you.
174
175 Conveying under any other circumstances is permitted solely under
176the conditions stated below. Sublicensing is not allowed; section 10
177makes it unnecessary.
178
179 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180
181 No covered work shall be deemed part of an effective technological
182measure under any applicable law fulfilling obligations under article
18311 of the WIPO copyright treaty adopted on 20 December 1996, or
184similar laws prohibiting or restricting circumvention of such
185measures.
186
187 When you convey a covered work, you waive any legal power to forbid
188circumvention of technological measures to the extent such circumvention
189is effected by exercising rights under this License with respect to
190the covered work, and you disclaim any intention to limit operation or
191modification of the work as a means of enforcing, against the work's
192users, your or third parties' legal rights to forbid circumvention of
193technological measures.
194
195 4. Conveying Verbatim Copies.
196
197 You may convey verbatim copies of the Program's source code as you
198receive it, in any medium, provided that you conspicuously and
199appropriately publish on each copy an appropriate copyright notice;
200keep intact all notices stating that this License and any
201non-permissive terms added in accord with section 7 apply to the code;
202keep intact all notices of the absence of any warranty; and give all
203recipients a copy of this License along with the Program.
204
205 You may charge any price or no price for each copy that you convey,
206and you may offer support or warranty protection for a fee.
207
208 5. Conveying Modified Source Versions.
209
210 You may convey a work based on the Program, or the modifications to
211produce it from the Program, in the form of source code under the
212terms of section 4, provided that you also meet all of these conditions:
213
214 a) The work must carry prominent notices stating that you modified
215 it, and giving a relevant date.
216
217 b) The work must carry prominent notices stating that it is
218 released under this License and any conditions added under section
219 7. This requirement modifies the requirement in section 4 to
220 "keep intact all notices".
221
222 c) You must license the entire work, as a whole, under this
223 License to anyone who comes into possession of a copy. This
224 License will therefore apply, along with any applicable section 7
225 additional terms, to the whole of the work, and all its parts,
226 regardless of how they are packaged. This License gives no
227 permission to license the work in any other way, but it does not
228 invalidate such permission if you have separately received it.
229
230 d) If the work has interactive user interfaces, each must display
231 Appropriate Legal Notices; however, if the Program has interactive
232 interfaces that do not display Appropriate Legal Notices, your
233 work need not make them do so.
234
235 A compilation of a covered work with other separate and independent
236works, which are not by their nature extensions of the covered work,
237and which are not combined with it such as to form a larger program,
238in or on a volume of a storage or distribution medium, is called an
239"aggregate" if the compilation and its resulting copyright are not
240used to limit the access or legal rights of the compilation's users
241beyond what the individual works permit. Inclusion of a covered work
242in an aggregate does not cause this License to apply to the other
243parts of the aggregate.
244
245 6. Conveying Non-Source Forms.
246
247 You may convey a covered work in object code form under the terms
248of sections 4 and 5, provided that you also convey the
249machine-readable Corresponding Source under the terms of this License,
250in one of these ways:
251
252 a) Convey the object code in, or embodied in, a physical product
253 (including a physical distribution medium), accompanied by the
254 Corresponding Source fixed on a durable physical medium
255 customarily used for software interchange.
256
257 b) Convey the object code in, or embodied in, a physical product
258 (including a physical distribution medium), accompanied by a
259 written offer, valid for at least three years and valid for as
260 long as you offer spare parts or customer support for that product
261 model, to give anyone who possesses the object code either (1) a
262 copy of the Corresponding Source for all the software in the
263 product that is covered by this License, on a durable physical
264 medium customarily used for software interchange, for a price no
265 more than your reasonable cost of physically performing this
266 conveying of source, or (2) access to copy the
267 Corresponding Source from a network server at no charge.
268
269 c) Convey individual copies of the object code with a copy of the
270 written offer to provide the Corresponding Source. This
271 alternative is allowed only occasionally and noncommercially, and
272 only if you received the object code with such an offer, in accord
273 with subsection 6b.
274
275 d) Convey the object code by offering access from a designated
276 place (gratis or for a charge), and offer equivalent access to the
277 Corresponding Source in the same way through the same place at no
278 further charge. You need not require recipients to copy the
279 Corresponding Source along with the object code. If the place to
280 copy the object code is a network server, the Corresponding Source
281 may be on a different server (operated by you or a third party)
282 that supports equivalent copying facilities, provided you maintain
283 clear directions next to the object code saying where to find the
284 Corresponding Source. Regardless of what server hosts the
285 Corresponding Source, you remain obligated to ensure that it is
286 available for as long as needed to satisfy these requirements.
287
288 e) Convey the object code using peer-to-peer transmission, provided
289 you inform other peers where the object code and Corresponding
290 Source of the work are being offered to the general public at no
291 charge under subsection 6d.
292
293 A separable portion of the object code, whose source code is excluded
294from the Corresponding Source as a System Library, need not be
295included in conveying the object code work.
296
297 A "User Product" is either (1) a "consumer product", which means any
298tangible personal property which is normally used for personal, family,
299or household purposes, or (2) anything designed or sold for incorporation
300into a dwelling. In determining whether a product is a consumer product,
301doubtful cases shall be resolved in favor of coverage. For a particular
302product received by a particular user, "normally used" refers to a
303typical or common use of that class of product, regardless of the status
304of the particular user or of the way in which the particular user
305actually uses, or expects or is expected to use, the product. A product
306is a consumer product regardless of whether the product has substantial
307commercial, industrial or non-consumer uses, unless such uses represent
308the only significant mode of use of the product.
309
310 "Installation Information" for a User Product means any methods,
311procedures, authorization keys, or other information required to install
312and execute modified versions of a covered work in that User Product from
313a modified version of its Corresponding Source. The information must
314suffice to ensure that the continued functioning of the modified object
315code is in no case prevented or interfered with solely because
316modification has been made.
317
318 If you convey an object code work under this section in, or with, or
319specifically for use in, a User Product, and the conveying occurs as
320part of a transaction in which the right of possession and use of the
321User Product is transferred to the recipient in perpetuity or for a
322fixed term (regardless of how the transaction is characterized), the
323Corresponding Source conveyed under this section must be accompanied
324by the Installation Information. But this requirement does not apply
325if neither you nor any third party retains the ability to install
326modified object code on the User Product (for example, the work has
327been installed in ROM).
328
329 The requirement to provide Installation Information does not include a
330requirement to continue to provide support service, warranty, or updates
331for a work that has been modified or installed by the recipient, or for
332the User Product in which it has been modified or installed. Access to a
333network may be denied when the modification itself materially and
334adversely affects the operation of the network or violates the rules and
335protocols for communication across the network.
336
337 Corresponding Source conveyed, and Installation Information provided,
338in accord with this section must be in a format that is publicly
339documented (and with an implementation available to the public in
340source code form), and must require no special password or key for
341unpacking, reading or copying.
342
343 7. Additional Terms.
344
345 "Additional permissions" are terms that supplement the terms of this
346License by making exceptions from one or more of its conditions.
347Additional permissions that are applicable to the entire Program shall
348be treated as though they were included in this License, to the extent
349that they are valid under applicable law. If additional permissions
350apply only to part of the Program, that part may be used separately
351under those permissions, but the entire Program remains governed by
352this License without regard to the additional permissions.
353
354 When you convey a copy of a covered work, you may at your option
355remove any additional permissions from that copy, or from any part of
356it. (Additional permissions may be written to require their own
357removal in certain cases when you modify the work.) You may place
358additional permissions on material, added by you to a covered work,
359for which you have or can give appropriate copyright permission.
360
361 Notwithstanding any other provision of this License, for material you
362add to a covered work, you may (if authorized by the copyright holders of
363that material) supplement the terms of this License with terms:
364
365 a) Disclaiming warranty or limiting liability differently from the
366 terms of sections 15 and 16 of this License; or
367
368 b) Requiring preservation of specified reasonable legal notices or
369 author attributions in that material or in the Appropriate Legal
370 Notices displayed by works containing it; or
371
372 c) Prohibiting misrepresentation of the origin of that material, or
373 requiring that modified versions of such material be marked in
374 reasonable ways as different from the original version; or
375
376 d) Limiting the use for publicity purposes of names of licensors or
377 authors of the material; or
378
379 e) Declining to grant rights under trademark law for use of some
380 trade names, trademarks, or service marks; or
381
382 f) Requiring indemnification of licensors and authors of that
383 material by anyone who conveys the material (or modified versions of
384 it) with contractual assumptions of liability to the recipient, for
385 any liability that these contractual assumptions directly impose on
386 those licensors and authors.
387
388 All other non-permissive additional terms are considered "further
389restrictions" within the meaning of section 10. If the Program as you
390received it, or any part of it, contains a notice stating that it is
391governed by this License along with a term that is a further
392restriction, you may remove that term. If a license document contains
393a further restriction but permits relicensing or conveying under this
394License, you may add to a covered work material governed by the terms
395of that license document, provided that the further restriction does
396not survive such relicensing or conveying.
397
398 If you add terms to a covered work in accord with this section, you
399must place, in the relevant source files, a statement of the
400additional terms that apply to those files, or a notice indicating
401where to find the applicable terms.
402
403 Additional terms, permissive or non-permissive, may be stated in the
404form of a separately written license, or stated as exceptions;
405the above requirements apply either way.
406
407 8. Termination.
408
409 You may not propagate or modify a covered work except as expressly
410provided under this License. Any attempt otherwise to propagate or
411modify it is void, and will automatically terminate your rights under
412this License (including any patent licenses granted under the third
413paragraph of section 11).
414
415 However, if you cease all violation of this License, then your
416license from a particular copyright holder is reinstated (a)
417provisionally, unless and until the copyright holder explicitly and
418finally terminates your license, and (b) permanently, if the copyright
419holder fails to notify you of the violation by some reasonable means
420prior to 60 days after the cessation.
421
422 Moreover, your license from a particular copyright holder is
423reinstated permanently if the copyright holder notifies you of the
424violation by some reasonable means, this is the first time you have
425received notice of violation of this License (for any work) from that
426copyright holder, and you cure the violation prior to 30 days after
427your receipt of the notice.
428
429 Termination of your rights under this section does not terminate the
430licenses of parties who have received copies or rights from you under
431this License. If your rights have been terminated and not permanently
432reinstated, you do not qualify to receive new licenses for the same
433material under section 10.
434
435 9. Acceptance Not Required for Having Copies.
436
437 You are not required to accept this License in order to receive or
438run a copy of the Program. Ancillary propagation of a covered work
439occurring solely as a consequence of using peer-to-peer transmission
440to receive a copy likewise does not require acceptance. However,
441nothing other than this License grants you permission to propagate or
442modify any covered work. These actions infringe copyright if you do
443not accept this License. Therefore, by modifying or propagating a
444covered work, you indicate your acceptance of this License to do so.
445
446 10. Automatic Licensing of Downstream Recipients.
447
448 Each time you convey a covered work, the recipient automatically
449receives a license from the original licensors, to run, modify and
450propagate that work, subject to this License. You are not responsible
451for enforcing compliance by third parties with this License.
452
453 An "entity transaction" is a transaction transferring control of an
454organization, or substantially all assets of one, or subdividing an
455organization, or merging organizations. If propagation of a covered
456work results from an entity transaction, each party to that
457transaction who receives a copy of the work also receives whatever
458licenses to the work the party's predecessor in interest had or could
459give under the previous paragraph, plus a right to possession of the
460Corresponding Source of the work from the predecessor in interest, if
461the predecessor has it or can get it with reasonable efforts.
462
463 You may not impose any further restrictions on the exercise of the
464rights granted or affirmed under this License. For example, you may
465not impose a license fee, royalty, or other charge for exercise of
466rights granted under this License, and you may not initiate litigation
467(including a cross-claim or counterclaim in a lawsuit) alleging that
468any patent claim is infringed by making, using, selling, offering for
469sale, or importing the Program or any portion of it.
470
471 11. Patents.
472
473 A "contributor" is a copyright holder who authorizes use under this
474License of the Program or a work on which the Program is based. The
475work thus licensed is called the contributor's "contributor version".
476
477 A contributor's "essential patent claims" are all patent claims
478owned or controlled by the contributor, whether already acquired or
479hereafter acquired, that would be infringed by some manner, permitted
480by this License, of making, using, or selling its contributor version,
481but do not include claims that would be infringed only as a
482consequence of further modification of the contributor version. For
483purposes of this definition, "control" includes the right to grant
484patent sublicenses in a manner consistent with the requirements of
485this License.
486
487 Each contributor grants you a non-exclusive, worldwide, royalty-free
488patent license under the contributor's essential patent claims, to
489make, use, sell, offer for sale, import and otherwise run, modify and
490propagate the contents of its contributor version.
491
492 In the following three paragraphs, a "patent license" is any express
493agreement or commitment, however denominated, not to enforce a patent
494(such as an express permission to practice a patent or covenant not to
495sue for patent infringement). To "grant" such a patent license to a
496party means to make such an agreement or commitment not to enforce a
497patent against the party.
498
499 If you convey a covered work, knowingly relying on a patent license,
500and the Corresponding Source of the work is not available for anyone
501to copy, free of charge and under the terms of this License, through a
502publicly available network server or other readily accessible means,
503then you must either (1) cause the Corresponding Source to be so
504available, or (2) arrange to deprive yourself of the benefit of the
505patent license for this particular work, or (3) arrange, in a manner
506consistent with the requirements of this License, to extend the patent
507license to downstream recipients. "Knowingly relying" means you have
508actual knowledge that, but for the patent license, your conveying the
509covered work in a country, or your recipient's use of the covered work
510in a country, would infringe one or more identifiable patents in that
511country that you have reason to believe are valid.
512
513 If, pursuant to or in connection with a single transaction or
514arrangement, you convey, or propagate by procuring conveyance of, a
515covered work, and grant a patent license to some of the parties
516receiving the covered work authorizing them to use, propagate, modify
517or convey a specific copy of the covered work, then the patent license
518you grant is automatically extended to all recipients of the covered
519work and works based on it.
520
521 A patent license is "discriminatory" if it does not include within
522the scope of its coverage, prohibits the exercise of, or is
523conditioned on the non-exercise of one or more of the rights that are
524specifically granted under this License. You may not convey a covered
525work if you are a party to an arrangement with a third party that is
526in the business of distributing software, under which you make payment
527to the third party based on the extent of your activity of conveying
528the work, and under which the third party grants, to any of the
529parties who would receive the covered work from you, a discriminatory
530patent license (a) in connection with copies of the covered work
531conveyed by you (or copies made from those copies), or (b) primarily
532for and in connection with specific products or compilations that
533contain the covered work, unless you entered into that arrangement,
534or that patent license was granted, prior to 28 March 2007.
535
536 Nothing in this License shall be construed as excluding or limiting
537any implied license or other defenses to infringement that may
538otherwise be available to you under applicable patent law.
539
540 12. No Surrender of Others' Freedom.
541
542 If conditions are imposed on you (whether by court order, agreement or
543otherwise) that contradict the conditions of this License, they do not
544excuse you from the conditions of this License. If you cannot convey a
545covered work so as to satisfy simultaneously your obligations under this
546License and any other pertinent obligations, then as a consequence you may
547not convey it at all. For example, if you agree to terms that obligate you
548to collect a royalty for further conveying from those to whom you convey
549the Program, the only way you could satisfy both those terms and this
550License would be to refrain entirely from conveying the Program.
551
552 13. Use with the GNU Affero General Public License.
553
554 Notwithstanding any other provision of this License, you have
555permission to link or combine any covered work with a work licensed
556under version 3 of the GNU Affero General Public License into a single
557combined work, and to convey the resulting work. The terms of this
558License will continue to apply to the part which is the covered work,
559but the special requirements of the GNU Affero General Public License,
560section 13, concerning interaction through a network will apply to the
561combination as such.
562
563 14. Revised Versions of this License.
564
565 The Free Software Foundation may publish revised and/or new versions of
566the GNU General Public License from time to time. Such new versions will
567be similar in spirit to the present version, but may differ in detail to
568address new problems or concerns.
569
570 Each version is given a distinguishing version number. If the
571Program specifies that a certain numbered version of the GNU General
572Public License "or any later version" applies to it, you have the
573option of following the terms and conditions either of that numbered
574version or of any later version published by the Free Software
575Foundation. If the Program does not specify a version number of the
576GNU General Public License, you may choose any version ever published
577by the Free Software Foundation.
578
579 If the Program specifies that a proxy can decide which future
580versions of the GNU General Public License can be used, that proxy's
581public statement of acceptance of a version permanently authorizes you
582to choose that version for the Program.
583
584 Later license versions may give you additional or different
585permissions. However, no additional obligations are imposed on any
586author or copyright holder as a result of your choosing to follow a
587later version.
588
589 15. Disclaimer of Warranty.
590
591 THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599
600 16. Limitation of Liability.
601
602 IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610SUCH DAMAGES.
611
612 17. Interpretation of Sections 15 and 16.
613
614 If the disclaimer of warranty and limitation of liability provided
615above cannot be given local legal effect according to their terms,
616reviewing courts shall apply local law that most closely approximates
617an absolute waiver of all civil liability in connection with the
618Program, unless a warranty or assumption of liability accompanies a
619copy of the Program in return for a fee.
620
621 END OF TERMS AND CONDITIONS
622
623 How to Apply These Terms to Your New Programs
624
625 If you develop a new program, and you want it to be of the greatest
626possible use to the public, the best way to achieve this is to make it
627free software which everyone can redistribute and change under these terms.
628
629 To do so, attach the following notices to the program. It is safest
630to attach them to the start of each source file to most effectively
631state the exclusion of warranty; and each file should have at least
632the "copyright" line and a pointer to where the full notice is found.
633
634 <one line to give the program's name and a brief idea of what it does.>
635 Copyright (C) <year> <name of author>
636
637 This program is free software: you can redistribute it and/or modify
638 it under the terms of the GNU General Public License as published by
639 the Free Software Foundation, either version 3 of the License, or
640 (at your option) any later version.
641
642 This program is distributed in the hope that it will be useful,
643 but WITHOUT ANY WARRANTY; without even the implied warranty of
644 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 GNU General Public License for more details.
646
647 You should have received a copy of the GNU General Public License
648 along with this program. If not, see <http://www.gnu.org/licenses/>.
649
650Also add information on how to contact you by electronic and paper mail.
651
652 If the program does terminal interaction, make it output a short
653notice like this when it starts in an interactive mode:
654
655 <program> Copyright (C) <year> <name of author>
656 This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 This is free software, and you are welcome to redistribute it
658 under certain conditions; type `show c' for details.
659
660The hypothetical commands `show w' and `show c' should show the appropriate
661parts of the General Public License. Of course, your program's commands
662might be different; for a GUI interface, you would use an "about box".
663
664 You should also get your employer (if you work as a programmer) or school,
665if any, to sign a "copyright disclaimer" for the program, if necessary.
666For more information on this, and how to apply and follow the GNU GPL, see
667<http://www.gnu.org/licenses/>.
668
669 The GNU General Public License does not permit incorporating your program
670into proprietary programs. If your program is a subroutine library, you
671may consider it more useful to permit linking proprietary applications with
672the library. If this is what you want to do, use the GNU Lesser General
673Public License instead of this License. But first, please read
674<http://www.gnu.org/philosophy/why-not-lgpl.html>.
0675
=== renamed file 'LICENSE' => 'LICENSE.moved'
=== added file 'README.md'
--- README.md 1970-01-01 00:00:00 +0000
+++ README.md 2014-10-11 18:44:23 +0000
@@ -0,0 +1,195 @@
1Telegram for Ubuntu
2
3Pre-requisites
4==============
5These instructions have been tested on:
6
7 1. Ubuntu 14.04 (Trusty Tahr)
8 2. Ubuntu 14.10 (Utopic Unicorn)
9
10Ensure you have the Ubuntu SDK installed, as per:
11 http://developer.ubuntu.com/start/ubuntu-sdk/installing-the-sdk/
12
13You must set two environment variables for all scripts to work properly:
14
15 CLICK_SDK_ARCH=armhf # a value of amd64 also supported
16 CLICK_SDK_FRAMEWORK=ubuntu-sdk-14.10
17
18
19Bootstrap your development environment
20======================================
21
22 ./bootstrap.sh
23
24This step will call ``click chroot create`` to create the standard Ubuntu
25click chroot build environment. It will also install the required build
26dependencies for Telegram into the click chroot.
27
28If you already have the chroot and prerequisite packages installed, then
29calling ``./bootstrap.sh`` will only fetch the latest library files.
30
31Once in a while, it is better to run ``./bootstrap.sh update`` to upgrade
32the chroot and ensure it is up to date.
33
34
35Building
36========
37
38 ./build.sh
39
40This step will cross-compile Telegram in the click chroot. After running this
41step, you may also open the project in the Ubuntu IDE, by selecting the
42CMakeLists.txt file in the top-level directory.
43
44
45Packaging
46=========
47
48 ./click.sh
49
50This step will create an armhf click package suitable for installation on
51an Ubuntu Phone/Tablet device. To install the package for testing:
52
53 ./click.sh install
54
55Afterwards, search for the "telegram" in the App scope, and tap the icon
56to launch the app.
57
58
59Running on Ubuntu desktop
60=========================
61Alternatively, it is possible to build and run on your existing Ubuntu
62workstation (desktop or laptop).
63
64NOTE: this technique only works for Ubuntu 14.10 (utopic unicorn) machines
65 using the amd64 architecture.
66
67To run in this mode, you must:
68
69 1. set CLICK_SDK_ARCH=amd64
70 2. ./bootstrap.sh # creates a separate amd64 click chroot
71 3. ./build.sh # build for amd64 architecture
72 4. ./run.sh # runs app on desktop
73
74NOTE: you also need to install qml-module-qt-labs-settings on your host.
75
76NOTE: running on an Ubuntu 14.04 LTS (trusty) machine is possible using
77 LXC, but that is an advanced technique, and out of scope for this
78 document. If you are truly interested, please try the ``create``
79 script from the following repo:
80
81 https://github.com/achiang/ubuntu-sdk-lxc
82
83
84Debugging
85=========
86Telegram will log debug output on the phone to:
87
88 /home/phablet/.cache/upstart/
89
90The file name will resemble:
91
92 application-click-com.ubuntu.telegram_telegram_0.2.0+2.log
93
94But will change depending on the version number. Another common error may
95be AppArmor denials. To view those:
96
97 grep DENIED /var/log/syslog | grep telegram
98
99If Telegram crashes, it will create crash files similar to:
100
101 /var/crash/_usr_lib_arm-linux-gnueabihf_qt5_bin_qmlscene.32011.crash
102
103If there are also files named *.upload and *.uploaded, it means that the
104Ubuntu system error logger (named ``whoopsie``) has uploaded them to
105
106 https://errors.ubuntu.com/
107
108You must login to the page using your Ubuntu SSO credentials. Then you can
109find your crash's stack trace by navigating to:
110
111 https://errors.ubuntu.com/oops/<OOPS-ID>
112
113To find the OOP-ID, view:
114
115 /var/crash/upstart/whoopsie.log
116
117And search for a line that resembles:
118
119 Reported OOPS ID 4923130e-1879-11e4-ab04-fa163e339c81
120
121The long hex string should be entered into the URL above (without the angle
122brackets).
123
124If whoopsie did not upload the crash to the Ubuntu error tracker, you can
125still analyze the crash locally. Use ``adb pull`` to copy the *.crash file
126onto your development machine. Then:
127
128 sudo apt-get install apport-retrace
129 apport-cli <name of crash file>
130
131You can then follow the menu options to 'V'iew the trace locally. The other
132option is to install ``apport-retrace`` on your device itself, and directly
133issue:
134
135 apport-retrace <name of crash file>
136
137Finally, please file all bugs to:
138
139 https://bugs.launchpad.net/libqtelegram
140
141
142Development
143===========
144
145These are the important branches:
146
147 lp:libqtelegram
148
149 - the trunk of the libqtelegram library
150
151 lp:libqtelegram/dev
152
153 - the devel branch of the libqtelegram library
154
155 lp:libqtelegram/app
156
157 - the trunk of the Telegram app
158
159 lp:libqtelegram/app-dev
160
161 - the devel branch of the Telegram app
162
163Propose Telegram application merges to this branch:
164
165 lp:libqtelegram/app-dev
166
167Propose libqtelegram library merges to this branch:
168
169 lp:libqtelegram/dev
170
171
172More or less on the weekly basis, we land the devel branches to trunks.
173
174bzr tagging of lp:libqtelegram/app:
175Once a new page of the app is feature ready, bump the MINOR version.
176For backward compatible bug fixes, bump the PATCH version.
177
178 bzr tag MAJOR.MINOR.PATCH
179
180Building in the IDE is not fully supported, but you can try.
181
182 * be sure to import CMakeLists.txt
183 * add -DCLICK_MODE=on as a cmake command line arg
184
185
186Credits
187=======
188Telegram for Ubuntu uses libqtelegram, a Telegram library written in Qt,
189based on telegram-cli @ https://github.com/vysheng/tg
190
191
192Contact
193=======
194rmescandon and karni @ irc.freenode.net
195
0196
=== added file 'README.translations'
--- README.translations 1970-01-01 00:00:00 +0000
+++ README.translations 2014-10-11 18:44:23 +0000
@@ -0,0 +1,35 @@
1# Updating translations
2
3Translations for the Telegram app happen in [Launchpad Translations][] and
4are automatically committed daily on the trunk branch in the po/ folder.
5
6They are then built and installed as part of the package build, so that
7developers don't really need to worry about them.
8
9However, there is one task that needs to be taken care of: exposing new
10translatable messages to translators. So whenever you add new translatable
11messages in the code, make sure to follow these steps:
12
13 1. Run click-buddy retaining the build directory:
14 `click-buddy --dir . --no-clean`
15 2. Commit and push the branch and send a merge proposal as usual
16
17And that's it, once the branch lands Launchpad should take care of all the rest!
18
19# Behind the scenes
20
21Behind the scenes, whenever the po/*.pot file (also known as translations template)
22is committed to trunk Launchpad reads it and updates the translatable strings
23exposed in the web UI. This will enable translators to work on the new strings.
24The translations template contains all translatable strings that have been
25extracted from the source code files.
26
27Launchpad will then store translations in its database and will commit them daily
28in the form of textual po/*.po files to trunk. The PO files are also usually
29referred to as the translations files. You'll find a translation file for each
30language the app has got at least a translated message available for.
31
32Translations for core apps follow the standard [gettext format][].
33
34 [Launchpad Translations]: https://translations.launchpad.net/libqtelegram
35 [gettext format]: https://www.gnu.org/software/gettext/
036
=== added file 'apparmor-push.json'
--- apparmor-push.json 1970-01-01 00:00:00 +0000
+++ apparmor-push.json 2014-10-11 18:44:23 +0000
@@ -0,0 +1,7 @@
1{
2 "template": "ubuntu-push-helper",
3 "policy_groups": [
4 "push-notification-client"
5 ],
6 "policy_version": 1.2
7}
08
=== added file 'apparmor-telegram.json'
--- apparmor-telegram.json 1970-01-01 00:00:00 +0000
+++ apparmor-telegram.json 2014-10-11 18:44:23 +0000
@@ -0,0 +1,11 @@
1{
2 "policy_groups": [
3 "networking",
4 "connectivity",
5 "content_exchange",
6 "audio",
7 "webview",
8 "push-notification-client"
9 ],
10 "policy_version": 1.2
11}
012
=== added directory 'assets'
=== added directory 'assets/sound'
=== added file 'assets/sound/sound_a.wav'
1Binary files assets/sound/sound_a.wav 1970-01-01 00:00:00 +0000 and assets/sound/sound_a.wav 2014-10-11 18:44:23 +0000 differ13Binary files assets/sound/sound_a.wav 1970-01-01 00:00:00 +0000 and assets/sound/sound_a.wav 2014-10-11 18:44:23 +0000 differ
=== added file 'bootstrap.sh'
--- bootstrap.sh 1970-01-01 00:00:00 +0000
+++ bootstrap.sh 2014-10-11 18:44:23 +0000
@@ -0,0 +1,55 @@
1#!/bin/bash
2
3set -e
4
5: ${CLICK_SDK_ARCH:?"Need to set CLICK_SDK_ARCH non-empty"}
6: ${CLICK_SDK_FRAMEWORK:?"Need to set CLICK_SDK_FRAMEWORK non-empty"}
7SERIES=utopic
8CLICK_CHROOT_NAME=click
9
10echo "[LOG]: Bootstrapping development environment for Telegram..."
11
12#################################
13## Download libqtelegram library
14#################################
15# Point this to a feature branch, if you need to test against non-trunk.
16LIBQTELEGRAM_BRANCH=lp:libqtelegram
17echo "[LOG]: Branching ${LIBQTELEGRAM_BRANCH} and updating library files in the source tree"
18rm -rf library
19bzr branch $LIBQTELEGRAM_BRANCH library
20
21#######################
22## Create click chroot
23#######################
24
25# Function to upgrade the chroot and install the prerequisite packages
26update() {
27 click chroot -a ${CLICK_SDK_ARCH} -f ${CLICK_SDK_FRAMEWORK} -n ${CLICK_CHROOT_NAME} upgrade
28 click chroot -a ${CLICK_SDK_ARCH} -f ${CLICK_SDK_FRAMEWORK} -n ${CLICK_CHROOT_NAME} maint apt-get install -y \
29 libssl-dev:${CLICK_SDK_ARCH} \
30 libsqlite3-dev:${CLICK_SDK_ARCH} \
31 qtdeclarative5-ubuntu-telephony-phonenumber0.1 \
32 qml-module-qt-labs-settings \
33 intltool \
34 bzr \
35 --no-install-recommends
36}
37
38if ! click chroot -a ${CLICK_SDK_ARCH} -f ${CLICK_SDK_FRAMEWORK} -n ${CLICK_CHROOT_NAME} exists
39then
40 echo "[LOG]: Creating Ubuntu build chroot ${CLICK_SDK_FRAMEWORK}-${CLICK_SDK_ARCH} " \
41 "and installing prerequisite packages."
42 sudo /usr/share/qtcreator/ubuntu/scripts/click_create_target \
43 ${CLICK_SDK_ARCH} ${CLICK_SDK_FRAMEWORK} $SERIES $CLICK_CHROOT_NAME
44 update
45fi
46
47if [ "$1" == "update" ]; then
48 echo "[LOG]: Updating schroot and rechecking prequisite packages..."
49 update
50fi
51
52echo "-----------------------------------------"
53echo "[LOG]: Boostrapping complete!"
54echo "[LOG]: ARCHITECTURE: ${CLICK_SDK_ARCH}"
55echo "-----------------------------------------"
056
=== added file 'build.sh'
--- build.sh 1970-01-01 00:00:00 +0000
+++ build.sh 2014-10-11 18:44:23 +0000
@@ -0,0 +1,23 @@
1#!/bin/bash
2
3set -e
4
5: ${CLICK_SDK_ARCH:?"Need to set CLICK_SDK_ARCH non-empty"}
6: ${CLICK_SDK_FRAMEWORK:?"Need to set CLICK_SDK_FRAMEWORK non-empty"}
7SERIES=utopic
8
9# XXX: uncomment if the country list ever changes...
10#./countries.py
11
12BUILD=build/${CLICK_SDK_ARCH}
13rm -rf $BUILD
14mkdir -p $BUILD && cd $BUILD
15
16SDK_PATH=/usr/share/qtcreator/ubuntu/scripts
17${SDK_PATH}/qtc_chroot_cmake ${CLICK_SDK_ARCH} ${CLICK_SDK_FRAMEWORK} $SERIES ../..
18${SDK_PATH}/qtc_chroot_make ${CLICK_SDK_ARCH} ${CLICK_SDK_FRAMEWORK} $SERIES
19
20echo "-------------------"
21echo "Done building."
22echo "ARCHITECTURE: ${CLICK_SDK_ARCH}"
23echo "-------------------"
024
=== renamed file 'build.sh' => 'build.sh.moved'
=== added file 'clean.sh'
--- clean.sh 1970-01-01 00:00:00 +0000
+++ clean.sh 2014-10-11 18:44:23 +0000
@@ -0,0 +1,8 @@
1#!/bin/bash
2
3rm -rf build
4rm -rf click
5rm -f *.click
6rm -f manifest.json
7rm -f telegram.desktop
8
09
=== added file 'click.sh'
--- click.sh 1970-01-01 00:00:00 +0000
+++ click.sh 2014-10-11 18:44:23 +0000
@@ -0,0 +1,52 @@
1#!/bin/bash
2
3set -e
4
5# Hardcode $ARCH for now, as it doesn't make sense to build an amd64 click
6# package. If we ever need to support that case, we'll use the
7# same environment variable detection trick as bootstrap.sh or build.sh
8ARCH=armhf
9ARCH_TRIPLET=arm-linux-gnueabihf
10DIR=`basename "$PWD"`
11
12PACKAGE=com.ubuntu.telegram
13CLICK=$(ls *.click|grep armhf|tail -n 1)
14
15rm -f *.click
16rm -rf click
17mkdir -p click
18mkdir -p click/lib/$ARCH_TRIPLET
19
20cp manifest.json click/
21cp build/armhf/telegram.desktop click/
22
23cp -a build/$ARCH/library/lib/libqtelegram.so* click/lib/$ARCH_TRIPLET
24cp -a build/$ARCH/library/qmlplugin/Telegram click/lib/$ARCH_TRIPLET
25
26cp apparmor-push.json click/
27cp push.json click/
28cp push.py click/
29
30cp apparmor-telegram.json click/
31cp telegram.qml click/
32cp telegram.pub click/
33
34cp -a components click/
35cp -a images click/
36cp -a assets click/
37cp -a ui click/
38cp -a js click/
39
40click build ./click
41
42echo "---------------------"
43echo "Done click packaging."
44echo "ARCHITECTURE: ${CLICK_SDK_ARCH}"
45echo "---------------------"
46
47if [ "$1" == "install" ]; then
48 CLICK=$(ls *.click|grep armhf|tail -n 1)
49 adb push $CLICK /tmp/
50 adb shell "sudo -u phablet -i pkcon install-local --allow-untrusted /tmp/$CLICK"
51 shift
52fi
053
=== added directory 'components'
=== added file 'components/CMakeLists.txt'
--- components/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ components/CMakeLists.txt 2014-10-11 18:44:23 +0000
@@ -0,0 +1,9 @@
1file(GLOB COMPONENTS_QML_JS_FILES *.qml *.js)
2
3# make the files visible in the qtcreator tree
4add_custom_target(telegram_components_QMlFiles ALL SOURCES ${COMPONENTS_QML_JS_FILES})
5
6install(FILES ${COMPONENTS_QML_JS_FILES} DESTINATION ${TELEGRAM_DIR}/components)
7
8add_subdirectory(listitems)
9
010
=== added file 'components/ContactImport.qml'
--- components/ContactImport.qml 1970-01-01 00:00:00 +0000
+++ components/ContactImport.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,111 @@
1/*
2 * Copyright (C) 2012-2014 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.2
18import Ubuntu.Components 1.1
19import Ubuntu.Components.Popups 1.0 as Popups
20import Ubuntu.Content 0.1 as ContentHub
21import QtContacts 5.0
22
23Item {
24 id: root
25
26 property var importDialog: null
27
28 signal contactsReceived(string url);
29
30 function requestContact()
31 {
32 if (!root.importDialog) {
33 root.importDialog = PopupUtils.open(contentHubDialog, root)
34 } else {
35 console.warn("Import dialog already running")
36 }
37 }
38
39 Component {
40 id: contentHubDialog
41
42 Popups.PopupBase {
43 id: dialogue
44
45 property alias activeTransfer: signalConnections.target
46 focus: true
47
48 Rectangle {
49 anchors.fill: parent
50
51 ContentHub.ContentPeerPicker {
52 id: peerPicker
53
54 anchors.fill: parent
55 contentType: ContentHub.ContentType.Contacts
56 handler: ContentHub.ContentHandler.Source
57
58 onPeerSelected: {
59 peer.selectionType = ContentHub.ContentTransfer.Single
60 dialogue.activeTransfer = peer.request()
61 }
62
63 onCancelPressed: {
64 PopupUtils.close(root.importDialog)
65 }
66 }
67 }
68
69 Connections {
70 id: signalConnections
71
72 onStateChanged: {
73 var done = ((dialogue.activeTransfer.state === ContentHub.ContentTransfer.Charged) ||
74 (dialogue.activeTransfer.state === ContentHub.ContentTransfer.Aborted))
75
76 if (dialogue.activeTransfer.state === ContentHub.ContentTransfer.Charged) {
77 dialogue.hide()
78 if (dialogue.activeTransfer.items.length > 0) {
79 root.contactsReceived(dialogue.activeTransfer.items[0].url)
80 }
81 }
82
83 if (done) {
84 acceptTimer.restart()
85 }
86 }
87 }
88
89 // WORKAROUND: Work around for application becoming insensitive to touch events
90 // if the dialog is dismissed while the application is inactive.
91 // Just listening for changes to Qt.application.active doesn't appear
92 // to be enough to resolve this, so it seems that something else needs
93 // to be happening first. As such there's a potential for a race
94 // condition here, although as yet no problem has been encountered.
95 Timer {
96 id: acceptTimer
97
98 interval: 100
99 repeat: true
100 running: false
101 onTriggered: {
102 if(Qt.application.active) {
103 PopupUtils.close(root.importDialog)
104 }
105 }
106 }
107
108 Component.onDestruction: root.importDialog = null
109 }
110 }
111}
0112
=== added file 'components/PageLoader.qml'
--- components/PageLoader.qml 1970-01-01 00:00:00 +0000
+++ components/PageLoader.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,13 @@
1import QtQuick 2.0
2
3Loader {
4 property bool valid: item !== null
5
6 active: false
7 asynchronous: false
8 anchors {
9 left: parent.left
10 bottom: parent.bottom
11 right: parent.right
12 }
13}
014
=== added file 'components/PictureImport.qml'
--- components/PictureImport.qml 1970-01-01 00:00:00 +0000
+++ components/PictureImport.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,110 @@
1/*
2 * Copyright (C) 2012-2014 Canonical, Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.2
18import Ubuntu.Components 1.1
19import Ubuntu.Components.Popups 1.0 as Popups
20import Ubuntu.Content 0.1 as ContentHub
21
22Item {
23 id: root
24
25 property var importDialog: null
26
27 signal pictureReceived(string pictureUrl)
28
29 function requestNewPicture()
30 {
31 if (!root.importDialog) {
32 root.importDialog = PopupUtils.open(contentHubDialog, root)
33 } else {
34 console.warn("Import dialog already running")
35 }
36 }
37
38 Component {
39 id: contentHubDialog
40
41 Popups.PopupBase {
42 id: dialogue
43
44 property alias activeTransfer: signalConnections.target
45 focus: true
46
47 Rectangle {
48 anchors.fill: parent
49
50 ContentHub.ContentPeerPicker {
51 id: peerPicker
52
53 anchors.fill: parent
54 contentType: ContentHub.ContentType.Pictures
55 handler: ContentHub.ContentHandler.Source
56
57 onPeerSelected: {
58 peer.selectionType = ContentHub.ContentTransfer.Single
59 dialogue.activeTransfer = peer.request()
60 }
61
62 onCancelPressed: {
63 PopupUtils.close(root.importDialog)
64 }
65 }
66 }
67
68 Connections {
69 id: signalConnections
70
71 onStateChanged: {
72 var done = ((dialogue.activeTransfer.state === ContentHub.ContentTransfer.Charged) ||
73 (dialogue.activeTransfer.state === ContentHub.ContentTransfer.Aborted))
74
75 if (dialogue.activeTransfer.state === ContentHub.ContentTransfer.Charged) {
76 dialogue.hide()
77 if (dialogue.activeTransfer.items.length > 0) {
78 root.pictureReceived(dialogue.activeTransfer.items[0].url)
79 }
80 }
81
82 if (done) {
83 acceptTimer.restart()
84 }
85 }
86 }
87
88 // WORKAROUND: Work around for application becoming insensitive to touch events
89 // if the dialog is dismissed while the application is inactive.
90 // Just listening for changes to Qt.application.active doesn't appear
91 // to be enough to resolve this, so it seems that something else needs
92 // to be happening first. As such there's a potential for a race
93 // condition here, although as yet no problem has been encountered.
94 Timer {
95 id: acceptTimer
96
97 interval: 100
98 repeat: true
99 running: false
100 onTriggered: {
101 if(Qt.application.active) {
102 PopupUtils.close(root.importDialog)
103 }
104 }
105 }
106
107 Component.onDestruction: root.importDialog = null
108 }
109 }
110}
0111
=== added file 'components/SentPhraseBubble.qml'
--- components/SentPhraseBubble.qml 1970-01-01 00:00:00 +0000
+++ components/SentPhraseBubble.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,41 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3
4UbuntuShape {
5
6 property alias text : phrase.text
7
8 //anchors.right: parent.right
9
10 width: (parent.width * 0.8 > childrenRect.width) ? parent.width * 0.8 : childrenRect.width
11 //width: childrenRect.width
12 height: childrenRect.height
13
14 color: "lightgreen"
15
16
17 Label {
18 id: phrase
19 text: "que tal estas?"
20 }
21 Label {
22 id: date
23 anchors {
24 left: phrase.right
25 //bottom: parent.bottom
26 leftMargin: units.gu(1)
27 }
28 text: "11:30"
29 fontSize: "small"
30 }
31 Image {
32 anchors {
33 left: date.right
34 //bottom: parent.bottom
35 leftMargin: units.gu(1)
36 }
37 source: "../images/confirm.png"
38 height: phrase.height /2
39 width: phrase.height
40 }
41}
042
=== added file 'components/TelegramBubble.qml'
--- components/TelegramBubble.qml 1970-01-01 00:00:00 +0000
+++ components/TelegramBubble.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,16 @@
1import QtQuick 2.0
2
3BorderImage {
4 property bool outgoing
5 function selectBubble() {
6 var fileName = "../images/conversation_";
7 if (outgoing) {
8 fileName += "outgoing.sci";
9 } else {
10 fileName += "incoming.sci";
11 }
12 return fileName;
13 }
14 onOutgoingChanged: source = selectBubble()
15 source: selectBubble()
16}
017
=== added file 'components/TelegramButton.qml'
--- components/TelegramButton.qml 1970-01-01 00:00:00 +0000
+++ components/TelegramButton.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,47 @@
1import QtQuick 2.0
2import "TelegramColors.js" as TelegramColors
3
4Rectangle {
5 property alias text: buttonLabel.text
6 property alias textColor: buttonLabel.color
7
8 signal clicked
9
10 width: buttonLabel.width + units.gu(5)
11 height: buttonLabel.height + units.gu(2)
12 color: enabled ? TelegramColors.blue : TelegramColors.grey
13 radius: 3
14
15 Behavior on color {
16 ColorAnimation {
17 duration: 300
18 }
19 }
20
21 Text {
22 id: buttonLabel
23 anchors.centerIn: parent
24 horizontalAlignment: TextInput.AlignHCenter
25 verticalAlignment: TextInput.AlignVCenter
26
27 color: TelegramColors.white
28 font.pixelSize: FontUtils.sizeToPixels("large")
29 }
30
31 MouseArea {
32 id: startMessaging
33 anchors.fill: parent
34
35 onPressed: parent.onPressed()
36 onReleased: parent.onReleased()
37 onClicked: parent.clicked()
38 }
39
40 function onPressed() {
41 color = TelegramColors.dark_blue;
42 }
43
44 function onReleased() {
45 color = TelegramColors.blue
46 }
47}
048
=== added file 'components/TelegramColors.js'
--- components/TelegramColors.js 1970-01-01 00:00:00 +0000
+++ components/TelegramColors.js 2014-10-11 18:44:23 +0000
@@ -0,0 +1,21 @@
1.pragma library
2
3var black = "#000000"
4var white = "#ffffff"
5var grey = "#777777"
6var blue = "#2ca5e0"
7var dark_blue = "#1c94cf"
8
9var page_background = "#ffffff"
10
11var unread_green = "#5ec245"
12var dark_green = "#267932"
13
14var list_pressed = "#efefef"
15
16var transparent = "#00000000"
17
18var outgoing = "#e6ffd1"
19var incoming = "#ffffff"
20
21var chat_section = "#99a6bcca"
022
=== added file 'components/TelegramContactsListItem.qml'
--- components/TelegramContactsListItem.qml 1970-01-01 00:00:00 +0000
+++ components/TelegramContactsListItem.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,92 @@
1import QtQuick 2.0
2import Ubuntu.Components 1.1
3import "TelegramColors.js" as TelegramColors
4
5MouseArea {
6
7 property alias image: image.source
8 property alias title: title.text
9 property string lastSeen
10 property bool isOnline: false
11 property bool selected: false
12
13 id: listitem
14 width: parent.width
15 height: units.gu(8)
16
17 Rectangle {
18 id: background
19 anchors.fill: parent
20 color: listitem.selected ? TelegramColors.blue
21 : listitem.pressed ? TelegramColors.list_pressed : TelegramColors.white
22 }
23
24 UbuntuShape {
25 id: imageShape
26 anchors {
27 top: parent.top
28 topMargin: units.dp(4)
29 left: parent.left
30 leftMargin: units.gu(2)
31 bottom: parent.bottom
32 bottomMargin: units.dp(4)
33 rightMargin: units.gu(1)
34 }
35 width: height
36
37 image: Image {
38 id: image
39 anchors.fill: parent
40 antialiasing: true
41 asynchronous: true
42 fillMode: Image.PreserveAspectFit
43 }
44 }
45
46 Text {
47 id: title
48 anchors {
49 top: parent.top
50 topMargin: units.gu(1)
51 left: imageShape.right
52 leftMargin: units.gu(1.5)
53 right: parent.right
54 rightMargin: units.gu(1)
55 }
56 verticalAlignment: TextInput.AlignVCenter
57
58 font.pixelSize: FontUtils.sizeToPixels("large")
59 font.weight: Font.DemiBold
60 color: TelegramColors.black
61 text: i18n.tr("Contact")
62 }
63
64 Text {
65 id: subtitle
66 anchors {
67 top: title.bottom
68 left: title.left
69 bottom: parent.bottom
70 bottomMargin: units.dp(4)
71 right: parent.right
72 }
73 verticalAlignment: TextInput.AlignVCenter
74
75 font.pixelSize: FontUtils.sizeToPixels("medium")
76 color: isOnline ? TelegramColors.dark_blue : TelegramColors.grey
77 text: i18n.tr("Last seen")
78 }
79
80 onLastSeenChanged: updateLastSeen(lastSeen)
81
82 onIsOnlineChanged: updateLastSeen(lastSeen)
83
84 function updateLastSeen(lastSeen) {
85 if (isOnline) {
86 subtitle.text = i18n.tr("online");
87 } else {
88 // TRANSLATORS: the argument refers to a time
89 subtitle.text = i18n.tr("last seen %1").arg(lastSeen);
90 }
91 }
92}
093
=== added file 'components/TelegramDelegate.qml'
--- components/TelegramDelegate.qml 1970-01-01 00:00:00 +0000
+++ components/TelegramDelegate.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,196 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import Ubuntu.Components.ListItems 0.1 as ListItem
4import "../js/ba-linkify.js" as BaLinkify
5import "TelegramColors.js" as Color
6import Telegram 0.1
7
8Item {
9 property bool outgoing: false
10 property string message: ""
11 property int mediaType: 0
12 property string senderColor: ""
13 property string senderName: ""
14 property string senderImage: ""
15 property string time: ""
16 property string thumbnail: ""
17 property bool sent: false
18
19 property string textColor: outgoing ? "white" : "#333333"
20
21 id: messageDelegate
22 anchors {
23 left: parent ? parent.left : undefined
24 right: parent ? parent.right : undefined
25 }
26 height: internalDelegate.height
27
28 signal clicked()
29 signal profileImageClicked()
30
31 ListItem.Empty {
32 id: internalDelegate
33 anchors {
34 top: parent ? parent.top : undefined
35 left: parent ? parent.left : undefined
36 right: parent ? parent.right : undefined
37 }
38 height: bubble.height
39 showDivider: false
40 highlightWhenPressed: false
41
42 onClicked: messageDelegate.clicked()
43
44 Image {
45 id: image
46 anchors {
47 left: parent.left
48 leftMargin: source == "" ? 0 : units.gu(1)
49 bottom: parent.bottom
50 }
51
52 width: source == "" || source === undefined ? 0 : units.gu(5);
53 height: width
54 asynchronous: true
55 fillMode: Image.PreserveAspectCrop
56 source: senderImage
57
58 MouseArea {
59 anchors.fill: parent
60 onClicked: messageDelegate.profileImageClicked()
61 }
62 }
63
64 TelegramBubble {
65 id: bubble
66 outgoing: messageDelegate.outgoing
67 anchors {
68 top: parent.top
69 left: outgoing ? undefined: image.right
70 leftMargin: units.gu(1)
71 right: outgoing ? parent.right : undefined
72 rightMargin: units.gu(1)
73 }
74 height: messageContents.height + units.gu(2)
75 width: Math.max(messageLabel.width, senderLabel.width, messageStatusRow.width, messagePhoto.width) + units.gu(3)
76
77 Item {
78 id: messageContents
79 anchors {
80 top: parent.top
81 topMargin: units.gu(1)
82 left: parent.left
83 leftMargin: outgoing ? units.gu(1) : units.gu(2)
84 right: parent.right
85 rightMargin: units.gu(1.5)
86 }
87 height: childrenRect.height
88
89 Text {
90 id: senderLabel
91 anchors.top: parent.top
92 height: text === "" ? 0 : implicitHeight
93 font.pixelSize: FontUtils.sizeToPixels("small")
94 font.weight: Font.Normal
95 color: senderColor
96 text: senderName
97 }
98
99 Text {
100 id: messageLabel
101 anchors{
102 top: senderLabel.bottom
103 }
104 height: paintedHeight
105 width: Math.min(implicitWidth, 0.7 * internalDelegate.width)
106 wrapMode: Text.WrapAtWordBoundaryOrAnywhere
107 font.pixelSize: mediaType != TLMessageMedia.TypeMessageMediaEmpty ?
108 FontUtils.sizeToPixels("small") : FontUtils.sizeToPixels("medium")
109 font.weight: mediaType != TLMessageMedia.TypeMessageMediaEmpty ?
110 Font.DemiBold : Font.Normal
111 color: textColor
112 text: parseText(message)
113 onLinkActivated: Qt.openUrlExternally(link)
114
115 // Taken from messaging-app
116 function parseText(text) {
117 var phoneExp = /(\+?([0-9]+[ ]?)?\(?([0-9]+)\)?[-. ]?([0-9]+)[-. ]?([0-9]+)[-. ]?([0-9]+))/img;
118 // remove html tags
119 text = text.replace(/</g,'&lt;').replace(/>/g,'<tt>&gt;</tt>');
120 // replace line breaks
121 text = text.replace(/(\n)+/g, '<br />');
122 // check for links
123 var htmlText = BaLinkify.linkify(text);
124 if (htmlText !== text) {
125 return htmlText
126 }
127 // linkify phone numbers if no web links were found
128 return text.replace(phoneExp, '<a href="tel:///$1">$1</a>');
129 }
130 }
131
132 Image {
133 id: messagePhoto
134
135 anchors{
136 horizontalCenter: parent.horizontalCenter
137 top: senderLabel.bottom
138 }
139 asynchronous: true
140 visible: source !== ""
141 fillMode: Image.PreserveAspectFit
142 sourceSize.width: 0.6 * internalDelegate.width
143 sourceSize.height: 0.6 * internalDelegate.width
144 source: {
145 console.log("messagePhoto source: " + thumbnail);
146 return Qt.resolvedUrl(thumbnail);
147 }
148
149 onStatusChanged: {
150 if (status === Image.Error) {
151 source = "image://theme/image-missing"
152 width = 128
153 height = 128
154 }
155 }
156
157 MouseArea {
158 anchors.fill: parent
159 onClicked: {
160 var properties = { "previewSource": parent.source };
161 pageStack.push(previewPage, properties);
162 }
163 }
164 }
165
166 Row {
167 id: messageStatusRow
168
169 spacing: units.gu(0.5)
170
171 anchors {
172 top: messagePhoto.source != "" ? messagePhoto.bottom : messageLabel.bottom
173 right: parent.right
174 }
175
176 Text {
177 id: timeLabel
178 font.weight: Font.DemiBold
179 font.pixelSize: FontUtils.sizeToPixels("x-small")
180 color: outgoing ? Color.dark_green : Color.grey
181 text: time
182 }
183
184 Image {
185 id: messageSentStatus
186 visible: !sent
187 height: units.gu(1.4)
188 width: height
189 anchors.verticalCenter: timeLabel.verticalCenter
190 source: sent ? "" : Qt.resolvedUrl("../images/dialog_clock_w.png")
191 }
192 }
193 }
194 }
195 }
196}
0197
=== added file 'components/TelegramDialogsListItem.qml'
--- components/TelegramDialogsListItem.qml 1970-01-01 00:00:00 +0000
+++ components/TelegramDialogsListItem.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,216 @@
1import QtQuick 2.0
2import Ubuntu.Components 1.1
3import Ubuntu.Components.ListItems 1.0 as ListItem
4import "TelegramColors.js" as TelegramColors
5
6MouseArea {
7 property alias image: image.source
8 property alias title: title.text
9 property alias sender: sender.text
10 property alias subtitle: subtitle.text
11 property alias unread: unread.text
12 property alias time: time.text
13 property bool isGroup: false
14 property bool isMedia: false
15 property bool isAction: false
16 property int delivery: 0
17
18 readonly property int delivery_none: 0
19 readonly property int delivery_sent: 1
20 readonly property int delivery_read: 2
21
22 id: listitem
23 width: parent.width
24 height: units.gu(8)
25
26 Rectangle {
27 id: background
28 anchors.fill: parent
29 color: listitem.pressed ? TelegramColors.list_pressed : TelegramColors.white
30 }
31
32 UbuntuShape {
33 id: imageShape
34 anchors {
35 top: parent.top
36 topMargin: units.dp(4)
37 left: parent.left
38 leftMargin: units.gu(1)
39 bottom: divider.top
40 bottomMargin: units.dp(4)
41 rightMargin: units.gu(1)
42 }
43 width: height
44
45 image: Image {
46 id: image
47 anchors.fill: parent
48 antialiasing: true
49 asynchronous: true
50 fillMode: Image.PreserveAspectFit
51 }
52 }
53
54 Image {
55 id: grouplistIndicator
56 anchors {
57 top: parent.top
58 left: imageShape.right
59
60 topMargin: units.gu(1.5)
61 leftMargin: units.gu(1)
62 rightMargin: units.gu(1)
63 }
64 width: visible ? units.gu(3) : 0
65 fillMode: Image.PreserveAspectFit
66
67 source: Qt.resolvedUrl("../images/grouplist.png")
68 visible: isGroup
69 }
70
71 Text {
72 id: time
73 anchors {
74 top: parent.top
75 right: parent.right
76
77 margins: units.dp(4)
78 rightMargin: units.gu(1)
79 }
80 height: parent.height/2
81 horizontalAlignment: Text.AlignRight
82 verticalAlignment: Text.AlignVCenter
83
84 color: TelegramColors.grey
85 text: "Wed"
86 }
87
88 Rectangle {
89 id: unreadBox
90 anchors {
91 right: time.right
92 verticalCenter: subtitle.verticalCenter
93 }
94 width: Math.max(units.gu(2.8), unread.width + units.gu(1))
95 height: units.gu(2.5)
96 radius: 2
97
98 color: TelegramColors.unread_green
99 visible: unread.text != "" && unread.text != "0"
100
101 Text {
102 id: unread
103 anchors {
104 centerIn: parent
105 topMargin: units.dp(4)
106 rightMargin: time.anchors.rightMargin
107 leftMargin: time.anchors.leftMargin
108 }
109 horizontalAlignment: TextInput.AlignHCenter
110 verticalAlignment: TextInput.AlignVCenter
111
112 font.weight: Font.DemiBold
113 font.pixelSize: FontUtils.sizeToPixels("small")
114 color: TelegramColors.white
115 text: "6"
116 }
117 }
118
119 Image {
120 id: sentIndicator
121 anchors {
122 verticalCenter: time.verticalCenter
123 right: time.left
124 topMargin: time.anchors.topMargin
125 rightMargin: units.dp(8)
126 }
127 width: units.gu(2)
128 height: width
129 z: 1
130 fillMode: Image.PreserveAspectFit
131
132 source: (delivery >= delivery_sent) ? Qt.resolvedUrl("../images/dialogs_check.png") : ""
133 }
134
135 Image {
136 id: deliveredIndicator
137 anchors {
138 verticalCenter: time.verticalCenter
139 right: time.left
140 topMargin: time.anchors.topMargin
141 rightMargin: sentIndicator.anchors.rightMargin - units.dp(5)
142 }
143 width: units.gu(2)
144 height: width
145 z: 2
146 fillMode: Image.PreserveAspectFit
147
148 source: (delivery == delivery_read) ? Qt.resolvedUrl("../images/dialogs_halfcheck.png") : ""
149 }
150
151 Text {
152 id: title
153 anchors {
154 top: parent.top
155 left: grouplistIndicator.right
156 leftMargin: units.dp(4)
157 bottom: time.bottom
158 right: sentIndicator.left
159 }
160 verticalAlignment: TextInput.AlignVCenter
161
162 font.pixelSize: FontUtils.sizeToPixels("large")
163 font.weight: Font.DemiBold
164 color: TelegramColors.black
165 elide: Text.ElideRight
166 text: "Telegram"
167 }
168
169 Text {
170 id: sender
171 anchors {
172 top: title.bottom
173 left: isGroup ? imageShape.right : title.left
174 leftMargin: isGroup ? units.gu(1) : 0
175 bottom: parent.bottom
176 bottomMargin: units.dp(4)
177 }
178 verticalAlignment: TextInput.AlignVCenter
179 visible: !isAction
180
181 font.pixelSize: FontUtils.sizeToPixels("medium")
182 color: TelegramColors.dark_blue
183 text: "Sender"
184 }
185
186 Text {
187 id: subtitle
188 anchors {
189 top: title.bottom
190 left: sender.text ? sender.right : title.left
191 leftMargin: 0
192 bottom: parent.bottom
193 bottomMargin: units.dp(4)
194 right: unreadBox.left
195 rightMargin: units.dp(4)
196 }
197 horizontalAlignment: TextInput.AlignLeft
198 verticalAlignment: TextInput.AlignVCenter
199
200 font.pixelSize: FontUtils.sizeToPixels("medium")
201 color: isMedia || isAction ? TelegramColors.dark_blue : TelegramColors.grey
202 elide: Text.ElideRight
203 text: "This is a test message."
204 }
205
206 ListItem.ThinDivider {
207 id: divider
208 anchors {
209 bottom: parent.bottom
210 left: parent.left
211 leftMargin: units.gu(1)
212 right: parent.right
213 rightMargin: units.gu(1)
214 }
215 }
216}
0217
=== added file 'components/TelegramHeader.qml'
--- components/TelegramHeader.qml 1970-01-01 00:00:00 +0000
+++ components/TelegramHeader.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,79 @@
1import QtQuick 2.0
2
3// This component is intented for use in Ubuntu Header content.
4Item {
5 property alias title: titleText.text
6 property alias subtitle: subtitleText.text
7 property alias image: headerImage.source
8
9 property bool isConnecting: false
10
11 id: header
12 height: parent.height
13
14 Image {
15 id: headerImage
16 width: height
17 height: parent.height/2
18 anchors {
19 left: parent.left
20 verticalCenter: parent.verticalCenter
21 }
22 source: Qt.resolvedUrl("../images/ic_ab_logo.png")
23 RotationAnimation {
24 id: connectingAnimation
25 target: headerImage
26 direction: RotationAnimation.Clockwise
27 from: 0
28 to: 359
29 loops: Animation.Infinite
30 duration: 5000
31 alwaysRunToEnd: false
32 running: isConnecting
33
34 onRunningChanged: {
35 if (!running) {
36 connectingAnimation.stop();
37 headerImage.rotation = 0;
38 }
39 }
40 }
41 }
42
43 TelegramLabel {
44 id: titleText
45 // We need fixed width. Otherwise, we overflow action icons.
46 width: Math.min(implicitWidth, parent.width - headerImage.width - anchors.leftMargin)
47 anchors {
48 top: parent.top
49 topMargin: units.gu(1)
50 left: headerImage.right
51 leftMargin: units.gu(1)
52
53 verticalCenter: subtitleText.visible ? undefined : parent.verticalCenter
54 }
55 verticalAlignment: Text.AlignVCenter
56 height: subtitleText.visible ? parent.height / 2 : implicitHeight
57
58 font.pixelSize: FontUtils.sizeToPixels("large")
59 elide: Text.ElideRight
60 text: isConnecting ? i18n.tr("Connecting...") : i18n.tr("Telegram")
61 }
62
63 Text {
64 id: subtitleText
65 width: Math.min(implicitWidth, parent.width - headerImage.width - anchors.leftMargin)
66 anchors {
67 left: headerImage.right
68 leftMargin: units.gu(1)
69 bottom: parent.bottom
70 bottomMargin: units.gu(0.5)
71 }
72 verticalAlignment: Text.AlignVCenter
73 height: parent.height / 2
74 visible: text.length > 0
75
76 font.pixelSize: FontUtils.sizeToPixels("small")
77 elide: Text.ElideRight
78 }
79}
080
=== added file 'components/TelegramLabel.qml'
--- components/TelegramLabel.qml 1970-01-01 00:00:00 +0000
+++ components/TelegramLabel.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,10 @@
1import QtQuick 2.0
2import "../components"
3import "TelegramColors.js" as TelegramColors
4
5Text {
6 verticalAlignment: TextInput.AlignVCenter
7 horizontalAlignment: TextInput.AlignHCenter
8
9 color: TelegramColors.grey
10}
011
=== added file 'components/TelegramPage.qml'
--- components/TelegramPage.qml 1970-01-01 00:00:00 +0000
+++ components/TelegramPage.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,100 @@
1import QtQuick 2.0
2import Ubuntu.Components 1.1
3import Ubuntu.Connectivity 1.0
4import "TelegramColors.js" as TelegramColors
5
6Page {
7 id: root
8
9 property bool isSearching: false
10 property bool isOnline: NetworkingStatus.online
11 property bool isConnected: onlineIndicationOnly
12 ? isOnline
13 : isOnline && telegramClient.connected
14 property bool onlineIndicationOnly: false
15
16 property alias title: header.title
17 property alias subtitle: header.subtitle
18 property alias body: body.children
19 property alias searchTerm: searchField.text
20 property alias busy: activityIndicator.running
21
22 TelegramHeader {
23 id: header
24 isConnecting: !root.isConnected
25 visible: !isSearching
26 width: parent ? parent.width - units.gu(2) : undefined
27 }
28
29 TextField {
30 id: searchField
31 visible: isSearching
32 width: header.width
33 inputMethodHints: Qt.ImhNoPredictiveText
34
35 onTextChanged: {
36 if (typeof onSearchTermChanged === 'function') {
37 onSearchTermChanged(text);
38 }
39 }
40 }
41
42 head {
43 id: head
44 contents: isSearching ? searchField : header
45
46 backAction: Action {
47 id: backAction
48 iconName: "back"
49 onTriggered: {
50 if (isSearching) {
51 searchFinished();
52 return;
53 }
54 pageStack.pop();
55 if (typeof onBackPressed === 'function') {
56 onBackPressed();
57 }
58 }
59 }
60 }
61
62 Rectangle {
63 id: body
64 anchors.fill: parent
65 // Due to some fancy Page behavior, in fact,
66 // this doesn't end up as white anyway..
67 color: TelegramColors.page_background
68 }
69
70 ActivityIndicator {
71 id: activityIndicator
72 anchors.centerIn: parent
73 z: 101
74 }
75
76 Rectangle {
77 id: activityBackground
78 anchors.fill: parent
79 z: 100
80 color: "#44000000"
81 visible: activityIndicator.running
82 MouseArea {
83 anchors.fill: parent
84 preventStealing: true
85 enabled: activityIndicator.running
86 }
87 }
88
89 function searchPressed() {
90 isSearching = true;
91 searchField.forceActiveFocus();
92 }
93
94 function searchFinished() {
95 if (!isSearching) return;
96
97 isSearching = false;
98 searchField.text = "";
99 }
100}
0101
=== added file 'components/TelegramSection.qml'
--- components/TelegramSection.qml 1970-01-01 00:00:00 +0000
+++ components/TelegramSection.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,29 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import "TelegramColors.js" as Color
4
5Item {
6 anchors.margins: units.gu(1)
7
8 width: parent.width
9 height: childrenRect.height + units.gu(1)
10
11 Rectangle {
12 anchors.horizontalCenter: parent.horizontalCenter
13 width: sectionLabel.width + units.gu(2)
14 height: sectionLabel.height + units.gu(1)
15
16 color: Color.chat_section
17 radius: 3
18
19 Text {
20 id: sectionLabel
21 anchors.centerIn: parent
22
23 color: Color.white
24 font.weight: Font.DemiBold
25 font.pixelSize: FontUtils.sizeToPixels("medium")
26 text: section
27 }
28 }
29}
030
=== added file 'components/TgButton.qml'
--- components/TgButton.qml 1970-01-01 00:00:00 +0000
+++ components/TgButton.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,10 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3
4Button {
5 anchors{
6 left: parent.left
7 right: parent.right
8 }
9 text: i18n.tr("Next")
10}
011
=== added file 'components/TgLabel.qml'
--- components/TgLabel.qml 1970-01-01 00:00:00 +0000
+++ components/TgLabel.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,11 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3
4Label {
5 anchors{
6 left: parent.left
7 right: parent.right
8 }
9 horizontalAlignment: TextInput.AlignHCenter
10 verticalAlignment: TextInput.AlignVCenter
11}
012
=== added file 'components/TgTextField.qml'
--- components/TgTextField.qml 1970-01-01 00:00:00 +0000
+++ components/TgTextField.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,10 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3
4TextField {
5 anchors{
6 left: parent.left
7 right: parent.right
8 }
9 horizontalAlignment: TextInput.AlignHCenter
10}
011
=== added file 'components/country_data.js'
--- components/country_data.js 1970-01-01 00:00:00 +0000
+++ components/country_data.js 2014-10-11 18:44:23 +0000
@@ -0,0 +1,6 @@
1var name_to_tel = {"China, Republic of (Taiwan)": "886", "Bosnia and Herzegovina": "387", "Slovakia": "421", "Somaliland": "252", "Trinidad and Tobago": "-867", "San Marino": "378", "Jordan": "962", "Cambodia": "855", "Norway": "47", "Burundi": "257", "Aland": "340", "Syria": "963", "Cook Islands": "682", "Malaysia": "60", "Egypt": "20", "Guyana": "592", "Estonia": "372", "Rwanda": "250", "Lebanon": "961", "Eritrea": "291", "Benin": "229", "France": "33", "Bhutan": "975", "Mozambique": "258", "Saint Martin": "590", "Nigeria": "234", "Croatia": "385", "Dominica": "-766", "Japan": "81", "Colombia": "57", "Canada": "1", "South Africa": "27", "Pakistan": "92", "Solomon Islands": "677", "Paraguay": "595", "Comoros": "269", "Macau": "853", "Bolivia": "591", "Belgium": "32", "Botswana": "267", "Anguilla": "-263", "Uzbekistan": "998", "Niger": "227", "New Caledonia": "687", "Israel": "972", "Congo, (Congo \u0096 Brazzaville)": "242", "Chile": "56", "Slovenia": "386", "Sweden": "46", "Monaco": "377", "Niue": "683", "Kuwait": "965", "Luxembourg": "352", "Barbados": "-245", "Mauritania": "222", "Togo": "228", "Peru": "51", "Thailand": "66", "Equatorial Guinea": "240", "Qatar": "974", "Montenegro": "382", "Australia": "61", "Grenada": "-472", "Suriname": "597", "Switzerland": "41", "Aruba": "297", "Azerbaijan": "994", "Venezuela": "58", "Bahamas, The": "-241", "Samoa": "685", "Djibouti": "253", "Singapore": "65", "Kiribati": "686", "American Samoa": "-683", "Hungary": "36", "Korea, South": "82", "Cote d'Ivoire (Ivory Coast)": "225", "Guatemala": "502", "Greece": "30", "Common Name": "ITU-T Telephone Code", "Vatican City": "379", "Zambia": "260", "Kazakhstan": "7", "Argentina": "54", "Belize": "501", "Chad": "235", "Guinea": "224", "Tonga": "676", "Poland": "48", "Myanmar (Burma)": "95", "Netherlands Antilles": "599", "Dominican Republic": "+1-809 and 1-829", "Saint Vincent and the Grenadines": "-783", "Gibraltar": "350", "Andorra": "376", "Cayman Islands": "-344", "Mauritius": "230", "Ascension": "247", "Cameroon": "237", "Fiji": "679", "Puerto Rico": "+1-787 and 1-939", "Angola": "244", "Maldives": "960", "Haiti": "509", "Saint Helena": "290", "Cuba": "53", "China, People's Republic of": "86", "Uganda": "256", "Mexico": "52", "Nagorno-Karabakh": "277", "Sao Tome and Principe": "239", "Mongolia": "976", "Saint Pierre and Miquelon": "508", "Korea, North": "850", "Uruguay": "598", "Cocos (Keeling) Islands": "61", "El Salvador": "503", "Bermuda": "-440", "Somalia": "252", "Ghana": "233", "Libya": "218", "Northern Mariana Islands": "-669", "Vietnam": "84", "Mayotte": "262", "Marshall Islands": "692", "Greenland": "299", "Morocco": "212", "Vanuatu": "678", "Liberia": "231", "Isle of Man": "44", "Palau": "680", "Martinique": "596", "Saint Kitts and Nevis": "-868", "Panama": "507", "Laos": "856", "Namibia": "264", "British Virgin Islands": "-283", "Kyrgyzstan": "996", "Kenya": "254", "Tokelau": "690", "Cape Verde": "238", "Sudan": "249", "Norfolk Island": "672", "French Guiana": "594", "Turkey": "90", "Gambia, The": "220", "Moldova": "373", "Italy": "39", "Nicaragua": "505", "Costa Rica": "506", "Lesotho": "266", "Falkland Islands (Islas Malvinas)": "500", "Guam": "-670", "Sierra Leone": "232", "Oman": "968", "Iceland": "354", "Brunei": "673", "Turkmenistan": "993", "Philippines": "63", "Ethiopia": "251", "India": "91", "Romania": "40", "Malawi": "265", "Micronesia": "691", "Czech Republic": "420", "Spain": "34", "South Ossetia": "995", "Timor-Leste (East Timor)": "670", "Abkhazia": "995", "Armenia": "374", "Madagascar": "261", "Serbia": "381", "Iran": "98", "British Indian Ocean Territory": "246", "Brazil": "55", "United Kingdom": "44", "Hong Kong": "852", "Ecuador": "593", "Lithuania": "370", "Pridnestrovie (Transnistria)": "-160", "Belarus": "375", "Yemen": "967", "Gabon": "241", "U.S. Virgin Islands": "-339", "Wallis and Futuna": "681", "Jersey": "44", "Burkina Faso": "226", "Christmas Island": "61", "United Arab Emirates": "971", "Indonesia": "62", "Cyprus": "357", "Papua New Guinea": "675", "Latvia": "371", "Afghanistan": "93", "Senegal": "221", "Reunion": "262", "Russia": "7", "Tajikistan": "992", "Iraq": "964", "Georgia": "995", "Saint Barthelemy": "590", "Saudi Arabia": "966", "Austria": "43", "Honduras": "504", "Swaziland": "268", "Albania": "355", "Nepal": "977", "French Polynesia": "689", "Finland": "358", "Jamaica": "-875", "Central African Republic": "236", "Denmark": "45", "Mali": "223", "Tunisia": "216", "Germany": "49", "Congo, (Congo \u0096 Kinshasa)": "243", "Faroe Islands": "298", "Sri Lanka": "94", "Seychelles": "248", "Tristan da Cunha": "290", "Turks and Caicos Islands": "-648", "Tanzania": "255", "Zimbabwe": "263", "United States": "1", "Liechtenstein": "423", "Nauru": "674", "Guernsey": "44", "Northern Cyprus": "-302", "Bulgaria": "359", "Malta": "356", "Guadeloupe": "590", "Montserrat": "-663", "Portugal": "351", "Ukraine": "380", "Macedonia": "389", "Ireland": "353", "Svalbard": "47", "Netherlands": "31", "Antigua and Barbuda": "-267", "New Zealand": "64", "Bahrain": "973", "Saint Lucia": "-757", "Guinea-Bissau": "245", "Algeria": "213", "Tuvalu": "688", "Bangladesh": "880"};
2var name_to_iso = {"China, Republic of (Taiwan)": "TW", "Bosnia and Herzegovina": "BA", "Slovakia": "SK", "Somaliland": "SO", "Trinidad and Tobago": "TT", "San Marino": "SM", "Jordan": "JO", "Cambodia": "KH", "Norway": "NO", "Burundi": "BI", "Aland": "AX", "Syria": "SY", "Cook Islands": "CK", "Malaysia": "MY", "Egypt": "EG", "Guyana": "GY", "Estonia": "EE", "Rwanda": "RW", "Lebanon": "LB", "Eritrea": "ER", "Benin": "BJ", "France": "FR", "Bhutan": "BT", "Mozambique": "MZ", "Saint Martin": "GP", "Nigeria": "NG", "Croatia": "HR", "Dominica": "DM", "Japan": "JP", "Colombia": "CO", "Canada": "CA", "South Africa": "ZA", "Pakistan": "PK", "Solomon Islands": "SB", "Paraguay": "PY", "Comoros": "KM", "Macau": "MO", "Bolivia": "BO", "Belgium": "BE", "Botswana": "BW", "Anguilla": "AI", "Uzbekistan": "UZ", "Niger": "NE", "New Caledonia": "NC", "Israel": "IL", "Congo, (Congo \u0096 Brazzaville)": "CG", "Chile": "CL", "Slovenia": "SI", "Sweden": "SE", "Monaco": "MC", "Niue": "NU", "Kuwait": "KW", "Luxembourg": "LU", "Barbados": "BB", "Mauritania": "MR", "Togo": "TG", "Peru": "PE", "Thailand": "TH", "Equatorial Guinea": "GQ", "Qatar": "QA", "Montenegro": "ME", "Australia": "AU", "Grenada": "GD", "Suriname": "SR", "Switzerland": "CH", "Aruba": "AW", "Azerbaijan": "AZ", "Venezuela": "VE", "Bahamas, The": "BS", "Samoa": "WS", "Djibouti": "DJ", "Singapore": "SG", "Kiribati": "KI", "American Samoa": "AS", "Hungary": "HU", "Korea, South": "KR", "Cote d'Ivoire (Ivory Coast)": "CI", "Guatemala": "GT", "Greece": "GR", "Common Name": "ISO 3166-1 2 Letter Code", "Vatican City": "VA", "Zambia": "ZM", "Kazakhstan": "KZ", "Argentina": "AR", "Belize": "BZ", "Chad": "TD", "Guinea": "GN", "Tonga": "TO", "Poland": "PL", "Myanmar (Burma)": "MM", "Netherlands Antilles": "AN", "Dominican Republic": "DO", "Saint Vincent and the Grenadines": "VC", "Gibraltar": "GI", "Andorra": "AD", "Cayman Islands": "KY", "Mauritius": "MU", "Ascension": "AC", "Cameroon": "CM", "Fiji": "FJ", "Puerto Rico": "PR", "Angola": "AO", "Maldives": "MV", "Haiti": "HT", "Saint Helena": "SH", "Cuba": "CU", "China, People's Republic of": "CN", "Uganda": "UG", "Mexico": "MX", "Nagorno-Karabakh": "AZ", "Sao Tome and Principe": "ST", "Mongolia": "MN", "Saint Pierre and Miquelon": "PM", "Korea, North": "KP", "Uruguay": "UY", "Cocos (Keeling) Islands": "CC", "El Salvador": "SV", "Bermuda": "BM", "Somalia": "SO", "Ghana": "GH", "Libya": "LY", "Northern Mariana Islands": "MP", "Vietnam": "VN", "Mayotte": "YT", "Marshall Islands": "MH", "Greenland": "GL", "Morocco": "MA", "Vanuatu": "VU", "Liberia": "LR", "Isle of Man": "IM", "Palau": "PW", "Martinique": "MQ", "Saint Kitts and Nevis": "KN", "Panama": "PA", "Laos": "LA", "Namibia": "NA", "British Virgin Islands": "VG", "Kyrgyzstan": "KG", "Kenya": "KE", "Tokelau": "TK", "Cape Verde": "CV", "Sudan": "SD", "Norfolk Island": "NF", "French Guiana": "GF", "Turkey": "TR", "Gambia, The": "GM", "Moldova": "MD", "Italy": "IT", "Nicaragua": "NI", "Costa Rica": "CR", "Lesotho": "LS", "Falkland Islands (Islas Malvinas)": "FK", "Guam": "GU", "Sierra Leone": "SL", "Oman": "OM", "Iceland": "IS", "Brunei": "BN", "Turkmenistan": "TM", "Philippines": "PH", "Ethiopia": "ET", "India": "IN", "Romania": "RO", "Malawi": "MW", "Micronesia": "FM", "Czech Republic": "CZ", "Spain": "ES", "South Ossetia": "GE", "Timor-Leste (East Timor)": "TL", "Abkhazia": "GE", "Armenia": "AM", "Madagascar": "MG", "Serbia": "RS", "Iran": "IR", "British Indian Ocean Territory": "IO", "Brazil": "BR", "United Kingdom": "GB", "Hong Kong": "HK", "Ecuador": "EC", "Lithuania": "LT", "Pridnestrovie (Transnistria)": "MD", "Belarus": "BY", "Yemen": "YE", "Gabon": "GA", "U.S. Virgin Islands": "VI", "Wallis and Futuna": "WF", "Jersey": "JE", "Burkina Faso": "BF", "Christmas Island": "CX", "United Arab Emirates": "AE", "Indonesia": "ID", "Cyprus": "CY", "Papua New Guinea": "PG", "Latvia": "LV", "Afghanistan": "AF", "Senegal": "SN", "Reunion": "RE", "Russia": "RU", "Tajikistan": "TJ", "Iraq": "IQ", "Georgia": "GE", "Saint Barthelemy": "GP", "Saudi Arabia": "SA", "Austria": "AT", "Honduras": "HN", "Swaziland": "SZ", "Albania": "AL", "Nepal": "NP", "French Polynesia": "PF", "Finland": "FI", "Jamaica": "JM", "Central African Republic": "CF", "Denmark": "DK", "Mali": "ML", "Tunisia": "TN", "Germany": "DE", "Congo, (Congo \u0096 Kinshasa)": "CD", "Faroe Islands": "FO", "Sri Lanka": "LK", "Seychelles": "SC", "Tristan da Cunha": "TA", "Turks and Caicos Islands": "TC", "Tanzania": "TZ", "Zimbabwe": "ZW", "United States": "US", "Liechtenstein": "LI", "Nauru": "NR", "Guernsey": "GG", "Northern Cyprus": "CY", "Bulgaria": "BG", "Malta": "MT", "Guadeloupe": "GP", "Montserrat": "MS", "Portugal": "PT", "Ukraine": "UA", "Macedonia": "MK", "Ireland": "IE", "Svalbard": "SJ", "Netherlands": "NL", "Antigua and Barbuda": "AG", "New Zealand": "NZ", "Bahrain": "BH", "Saint Lucia": "LC", "Guinea-Bissau": "GW", "Algeria": "DZ", "Tuvalu": "TV", "Bangladesh": "BD"};
3var iso_to_name = {"ET": "Ethiopia", "IR": "Iran", "SH": "Saint Helena", "LV": "Latvia", "CX": "Christmas Island", "TV": "Tuvalu", "SY": "Syria", "CN": "China, People's Republic of", "NL": "Netherlands", "MW": "Malawi", "RU": "Russia", "AI": "Anguilla", "AT": "Austria", "TR": "Turkey", "NF": "Norfolk Island", "PK": "Pakistan", "CZ": "Czech Republic", "BZ": "Belize", "HK": "Hong Kong", "CF": "Central African Republic", "PF": "French Polynesia", "KI": "Kiribati", "FI": "Finland", "GU": "Guam", "NE": "Niger", "BD": "Bangladesh", "ZA": "South Africa", "GL": "Greenland", "MG": "Madagascar", "NA": "Namibia", "YT": "Mayotte", "UY": "Uruguay", "SZ": "Swaziland", "GP": "Guadeloupe", "GI": "Gibraltar", "MZ": "Mozambique", "NC": "New Caledonia", "MD": "Pridnestrovie (Transnistria)", "IO": "British Indian Ocean Territory", "GR": "Greece", "HN": "Honduras", "ES": "Spain", "VI": "U.S. Virgin Islands", "DZ": "Algeria", "TH": "Thailand", "AU": "Australia", "BR": "Brazil", "BG": "Bulgaria", "BA": "Bosnia and Herzegovina", "MR": "Mauritania", "AW": "Aruba", "VC": "Saint Vincent and the Grenadines", "SK": "Slovakia", "GN": "Guinea", "ST": "Sao Tome and Principe", "JE": "Jersey", "NO": "Norway", "VE": "Venezuela", "IN": "India", "BJ": "Benin", "SJ": "Svalbard", "NZ": "New Zealand", "CU": "Cuba", "AL": "Albania", "LY": "Libya", "CO": "Colombia", "AD": "Andorra", "HT": "Haiti", "AR": "Argentina", "AN": "Netherlands Antilles", "AE": "United Arab Emirates", "KZ": "Kazakhstan", "DO": "Dominican Republic", "NU": "Niue", "LI": "Liechtenstein", "MT": "Malta", "AZ": "Nagorno-Karabakh", "LC": "Saint Lucia", "ZW": "Zimbabwe", "BE": "Belgium", "EC": "Ecuador", "KM": "Comoros", "MH": "Marshall Islands", "MN": "Mongolia", "SL": "Sierra Leone", "BM": "Bermuda", "ISO 3166-1 2 Letter Code": "Common Name", "CY": "Northern Cyprus", "PW": "Palau", "SG": "Singapore", "MO": "Macau", "ML": "Mali", "MM": "Myanmar (Burma)", "PY": "Paraguay", "GB": "United Kingdom", "DM": "Dominica", "YE": "Yemen", "RS": "Serbia", "FK": "Falkland Islands (Islas Malvinas)", "KE": "Kenya", "JO": "Jordan", "RE": "Reunion", "LB": "Lebanon", "MV": "Maldives", "ID": "Indonesia", "BS": "Bahamas, The", "PT": "Portugal", "CM": "Cameroon", "AS": "American Samoa", "BN": "Brunei", "SD": "Sudan", "BB": "Barbados", "PH": "Philippines", "LA": "Laos", "LU": "Luxembourg", "SA": "Saudi Arabia", "IT": "Italy", "TA": "Tristan da Cunha", "MY": "Malaysia", "KW": "Kuwait", "SR": "Suriname", "KR": "Korea, South", "TD": "Chad", "RW": "Rwanda", "TG": "Togo", "SM": "San Marino", "AX": "Aland", "FJ": "Fiji", "BT": "Bhutan", "ME": "Montenegro", "HR": "Croatia", "CA": "Canada", "IS": "Iceland", "GW": "Guinea-Bissau", "EG": "Egypt", "PL": "Poland", "TZ": "Tanzania", "BH": "Bahrain", "PE": "Peru", "IL": "Israel", "VA": "Vatican City", "MA": "Morocco", "US": "United States", "GQ": "Equatorial Guinea", "BI": "Burundi", "IM": "Isle of Man", "GG": "Guernsey", "CL": "Chile", "GA": "Gabon", "AM": "Armenia", "GF": "French Guiana", "DK": "Denmark", "KY": "Cayman Islands", "IQ": "Iraq", "FR": "France", "TK": "Tokelau", "WF": "Wallis and Futuna", "KH": "Cambodia", "TM": "Turkmenistan", "RO": "Romania", "DJ": "Djibouti", "TW": "China, Republic of (Taiwan)", "MQ": "Martinique", "MX": "Mexico", "BW": "Botswana", "NG": "Nigeria", "SO": "Somaliland", "NP": "Nepal", "TT": "Trinidad and Tobago", "FM": "Micronesia", "SV": "El Salvador", "JP": "Japan", "HU": "Hungary", "FO": "Faroe Islands", "TC": "Turks and Caicos Islands", "KP": "Korea, North", "AG": "Antigua and Barbuda", "AC": "Ascension", "CH": "Switzerland", "GY": "Guyana", "PM": "Saint Pierre and Miquelon", "BY": "Belarus", "BF": "Burkina Faso", "GE": "South Ossetia", "LR": "Liberia", "CK": "Cook Islands", "LK": "Sri Lanka", "PR": "Puerto Rico", "MK": "Macedonia", "IE": "Ireland", "MC": "Monaco", "TO": "Tonga", "SC": "Seychelles", "MS": "Montserrat", "KN": "Saint Kitts and Nevis", "EE": "Estonia", "SI": "Slovenia", "PG": "Papua New Guinea", "CI": "Cote d'Ivoire (Ivory Coast)", "UG": "Uganda", "CC": "Cocos (Keeling) Islands", "SN": "Senegal", "TN": "Tunisia", "DE": "Germany", "GT": "Guatemala", "UZ": "Uzbekistan", "CV": "Cape Verde", "MU": "Mauritius", "WS": "Samoa", "MP": "Northern Mariana Islands", "ER": "Eritrea", "UA": "Ukraine", "CG": "Congo, (Congo \u0096 Brazzaville)", "GM": "Gambia, The", "CR": "Costa Rica", "SB": "Solomon Islands", "VU": "Vanuatu", "AO": "Angola", "JM": "Jamaica", "LT": "Lithuania", "OM": "Oman", "LS": "Lesotho", "BO": "Bolivia", "KG": "Kyrgyzstan", "GH": "Ghana", "NI": "Nicaragua", "ZM": "Zambia", "QA": "Qatar", "PA": "Panama", "VN": "Vietnam", "GD": "Grenada", "NR": "Nauru", "SE": "Sweden", "AF": "Afghanistan", "TJ": "Tajikistan", "CD": "Congo, (Congo \u0096 Kinshasa)", "TL": "Timor-Leste (East Timor)", "VG": "British Virgin Islands"};
4var iso_to_tel = {"ET": "251", "IR": "98", "SH": "290", "LV": "371", "CX": "61", "TV": "688", "SY": "963", "CN": "86", "NL": "31", "MW": "265", "RU": "7", "AI": "-263", "AT": "43", "TR": "90", "NF": "672", "PK": "92", "CZ": "420", "BZ": "501", "HK": "852", "CF": "236", "PF": "689", "KI": "686", "FI": "358", "GU": "-670", "NE": "227", "BD": "880", "ZA": "27", "GL": "299", "MG": "261", "NA": "264", "YT": "262", "UY": "598", "SZ": "268", "GP": "590", "GI": "350", "MZ": "258", "NC": "687", "MD": "-160", "IO": "246", "GR": "30", "HN": "504", "ES": "34", "VI": "-339", "DZ": "213", "TH": "66", "AU": "61", "BR": "55", "BG": "359", "BA": "387", "MR": "222", "AW": "297", "VC": "-783", "SK": "421", "GN": "224", "ST": "239", "JE": "44", "NO": "47", "VE": "58", "IN": "91", "BJ": "229", "SJ": "47", "NZ": "64", "CU": "53", "AL": "355", "LY": "218", "CO": "57", "AD": "376", "HT": "509", "AR": "54", "AN": "599", "AE": "971", "KZ": "7", "DO": "+1-809 and 1-829", "NU": "683", "LI": "423", "MT": "356", "AZ": "277", "LC": "-757", "ZW": "263", "BE": "32", "EC": "593", "KM": "269", "MH": "692", "MN": "976", "SL": "232", "BM": "-440", "ISO 3166-1 2 Letter Code": "ITU-T Telephone Code", "CY": "-302", "PW": "680", "SG": "65", "MO": "853", "ML": "223", "MM": "95", "PY": "595", "GB": "44", "DM": "-766", "YE": "967", "RS": "381", "FK": "500", "KE": "254", "JO": "962", "RE": "262", "LB": "961", "MV": "960", "ID": "62", "BS": "-241", "PT": "351", "CM": "237", "AS": "-683", "BN": "673", "SD": "249", "BB": "-245", "PH": "63", "LA": "856", "LU": "352", "SA": "966", "IT": "39", "TA": "290", "MY": "60", "KW": "965", "SR": "597", "KR": "82", "TD": "235", "RW": "250", "TG": "228", "SM": "378", "AX": "340", "FJ": "679", "BT": "975", "ME": "382", "HR": "385", "CA": "1", "IS": "354", "GW": "245", "EG": "20", "PL": "48", "TZ": "255", "BH": "973", "PE": "51", "IL": "972", "VA": "379", "MA": "212", "US": "1", "GQ": "240", "BI": "257", "IM": "44", "GG": "44", "CL": "56", "GA": "241", "AM": "374", "GF": "594", "DK": "45", "KY": "-344", "IQ": "964", "FR": "33", "TK": "690", "WF": "681", "KH": "855", "TM": "993", "RO": "40", "DJ": "253", "TW": "886", "MQ": "596", "MX": "52", "BW": "267", "NG": "234", "SO": "252", "NP": "977", "TT": "-867", "FM": "691", "SV": "503", "JP": "81", "HU": "36", "FO": "298", "TC": "-648", "KP": "850", "AG": "-267", "AC": "247", "CH": "41", "GY": "592", "PM": "508", "BY": "375", "BF": "226", "GE": "995", "LR": "231", "CK": "682", "LK": "94", "PR": "+1-787 and 1-939", "MK": "389", "IE": "353", "MC": "377", "TO": "676", "SC": "248", "MS": "-663", "KN": "-868", "EE": "372", "SI": "386", "PG": "675", "CI": "225", "UG": "256", "CC": "61", "SN": "221", "TN": "216", "DE": "49", "GT": "502", "UZ": "998", "CV": "238", "MU": "230", "WS": "685", "MP": "-669", "ER": "291", "UA": "380", "CG": "242", "GM": "220", "CR": "506", "SB": "677", "VU": "678", "AO": "244", "JM": "-875", "LT": "370", "OM": "968", "LS": "266", "BO": "591", "KG": "996", "GH": "233", "NI": "505", "ZM": "260", "QA": "974", "PA": "507", "VN": "84", "GD": "-472", "NR": "674", "SE": "46", "AF": "93", "TJ": "992", "CD": "243", "TL": "670", "VG": "-283"};
5var tel_to_name = {"961": "Lebanon", "995": "South Ossetia", "-283": "British Virgin Islands", "386": "Slovenia", "ITU-T Telephone Code": "Common Name", "90": "Turkey", "216": "Tunisia", "40": "Romania", "421": "Slovakia", "+1-787 and 1-939": "Puerto Rico", "855": "Cambodia", "20": "Egypt", "267": "Botswana", "389": "Macedonia", "243": "Congo, (Congo \u0096 Kinshasa)", "241": "Gabon", "965": "Kuwait", "62": "Indonesia", "51": "Peru", "998": "Uzbekistan", "240": "Equatorial Guinea", "594": "French Guiana", "41": "Switzerland", "886": "China, Republic of (Taiwan)", "236": "Central African Republic", "298": "Faroe Islands", "94": "Sri Lanka", "-683": "American Samoa", "220": "Gambia, The", "-783": "Saint Vincent and the Grenadines", "371": "Latvia", "975": "Bhutan", "54": "Argentina", "-472": "Grenada", "258": "Mozambique", "599": "Netherlands Antilles", "-302": "Northern Cyprus", "55": "Brazil", "972": "Israel", "670": "Timor-Leste (East Timor)", "375": "Belarus", "971": "United Arab Emirates", "960": "Maldives", "-669": "Northern Mariana Islands", "32": "Belgium", "81": "Japan", "61": "Cocos (Keeling) Islands", "508": "Saint Pierre and Miquelon", "30": "Greece", "233": "Ghana", "340": "Aland", "245": "Guinea-Bissau", "-663": "Montserrat", "-160": "Pridnestrovie (Transnistria)", "252": "Somaliland", "229": "Benin", "503": "El Salvador", "596": "Martinique", "-263": "Anguilla", "385": "Croatia", "968": "Oman", "228": "Togo", "598": "Uruguay", "86": "China, People's Republic of", "593": "Ecuador", "-245": "Barbados", "-440": "Bermuda", "-867": "Trinidad and Tobago", "500": "Falkland Islands (Islas Malvinas)", "65": "Singapore", "688": "Tuvalu", "266": "Lesotho", "49": "Germany", "506": "Costa Rica", "377": "Monaco", "880": "Bangladesh", "504": "Honduras", "358": "Finland", "-648": "Turks and Caicos Islands", "98": "Iran", "996": "Kyrgyzstan", "60": "Malaysia", "963": "Syria", "689": "French Polynesia", "372": "Estonia", "-670": "Guam", "686": "Kiribati", "974": "Qatar", "852": "Hong Kong", "352": "Luxembourg", "48": "Poland", "381": "Serbia", "359": "Bulgaria", "690": "Tokelau", "268": "Swaziland", "226": "Burkina Faso", "82": "Korea, South", "64": "New Zealand", "675": "Papua New Guinea", "376": "Andorra", "502": "Guatemala", "681": "Wallis and Futuna", "354": "Iceland", "591": "Bolivia", "420": "Czech Republic", "221": "Senegal", "255": "Tanzania", "380": "Ukraine", "501": "Belize", "242": "Congo, (Congo \u0096 Brazzaville)", "682": "Cook Islands", "856": "Laos", "57": "Colombia", "261": "Madagascar", "595": "Paraguay", "218": "Libya", "692": "Marshall Islands", "379": "Vatican City", "677": "Solomon Islands", "222": "Mauritania", "232": "Sierra Leone", "370": "Lithuania", "853": "Macau", "850": "Korea, North", "247": "Ascension", "249": "Sudan", "-344": "Cayman Islands", "-339": "U.S. Virgin Islands", "973": "Bahrain", "251": "Ethiopia", "269": "Comoros", "238": "Cape Verde", "47": "Svalbard", "590": "Guadeloupe", "277": "Nagorno-Karabakh", "244": "Angola", "212": "Morocco", "976": "Mongolia", "223": "Mali", "246": "British Indian Ocean Territory", "505": "Nicaragua", "53": "Cuba", "378": "San Marino", "260": "Zambia", "231": "Liberia", "1": "United States", "351": "Portugal", "673": "Brunei", "678": "Vanuatu", "993": "Turkmenistan", "56": "Chile", "63": "Philippines", "45": "Denmark", "36": "Hungary", "-875": "Jamaica", "-241": "Bahamas, The", "687": "New Caledonia", "967": "Yemen", "685": "Samoa", "691": "Micronesia", "977": "Nepal", "290": "Tristan da Cunha", "7": "Russia", "234": "Nigeria", "683": "Niue", "353": "Ireland", "374": "Armenia", "597": "Suriname", "254": "Kenya", "265": "Malawi", "992": "Tajikistan", "46": "Sweden", "-757": "Saint Lucia", "299": "Greenland", "291": "Eritrea", "43": "Austria", "256": "Uganda", "66": "Thailand", "964": "Iraq", "84": "Vietnam", "264": "Namibia", "297": "Aruba", "58": "Venezuela", "93": "Afghanistan", "34": "Spain", "+1-809 and 1-829": "Dominican Republic", "-868": "Saint Kitts and Nevis", "237": "Cameroon", "52": "Mexico", "224": "Guinea", "350": "Gibraltar", "672": "Norfolk Island", "225": "Cote d'Ivoire (Ivory Coast)", "44": "United Kingdom", "507": "Panama", "253": "Djibouti", "257": "Burundi", "227": "Niger", "966": "Saudi Arabia", "680": "Palau", "423": "Liechtenstein", "31": "Netherlands", "679": "Fiji", "91": "India", "230": "Mauritius", "994": "Azerbaijan", "235": "Chad", "-267": "Antigua and Barbuda", "373": "Moldova", "962": "Jordan", "676": "Tonga", "213": "Algeria", "674": "Nauru", "-766": "Dominica", "248": "Seychelles", "382": "Montenegro", "95": "Myanmar (Burma)", "250": "Rwanda", "357": "Cyprus", "262": "Reunion", "39": "Italy", "263": "Zimbabwe", "592": "Guyana", "239": "Sao Tome and Principe", "92": "Pakistan", "355": "Albania", "387": "Bosnia and Herzegovina", "509": "Haiti", "33": "France", "356": "Malta", "27": "South Africa"};
6var tel_to_iso = {"961": "LB", "995": "GE", "-283": "VG", "386": "SI", "ITU-T Telephone Code": "ISO 3166-1 2 Letter Code", "90": "TR", "216": "TN", "40": "RO", "421": "SK", "+1-787 and 1-939": "PR", "855": "KH", "20": "EG", "267": "BW", "389": "MK", "243": "CD", "241": "GA", "965": "KW", "62": "ID", "51": "PE", "998": "UZ", "240": "GQ", "594": "GF", "41": "CH", "886": "TW", "236": "CF", "298": "FO", "94": "LK", "-683": "AS", "220": "GM", "-783": "VC", "371": "LV", "975": "BT", "54": "AR", "-472": "GD", "258": "MZ", "599": "AN", "-302": "CY", "55": "BR", "972": "IL", "670": "TL", "375": "BY", "971": "AE", "960": "MV", "-669": "MP", "32": "BE", "81": "JP", "61": "CC", "508": "PM", "30": "GR", "233": "GH", "340": "AX", "245": "GW", "-663": "MS", "-160": "MD", "252": "SO", "229": "BJ", "503": "SV", "596": "MQ", "-263": "AI", "385": "HR", "968": "OM", "228": "TG", "598": "UY", "86": "CN", "593": "EC", "-245": "BB", "-440": "BM", "-867": "TT", "500": "FK", "65": "SG", "688": "TV", "266": "LS", "49": "DE", "506": "CR", "377": "MC", "880": "BD", "504": "HN", "358": "FI", "-648": "TC", "98": "IR", "996": "KG", "60": "MY", "963": "SY", "689": "PF", "372": "EE", "-670": "GU", "686": "KI", "974": "QA", "852": "HK", "352": "LU", "48": "PL", "381": "RS", "359": "BG", "690": "TK", "268": "SZ", "226": "BF", "82": "KR", "64": "NZ", "675": "PG", "376": "AD", "502": "GT", "681": "WF", "354": "IS", "591": "BO", "420": "CZ", "221": "SN", "255": "TZ", "380": "UA", "501": "BZ", "242": "CG", "682": "CK", "856": "LA", "57": "CO", "261": "MG", "595": "PY", "218": "LY", "692": "MH", "379": "VA", "677": "SB", "222": "MR", "232": "SL", "370": "LT", "853": "MO", "850": "KP", "247": "AC", "249": "SD", "-344": "KY", "-339": "VI", "973": "BH", "251": "ET", "269": "KM", "238": "CV", "47": "SJ", "590": "GP", "277": "AZ", "244": "AO", "212": "MA", "976": "MN", "223": "ML", "246": "IO", "505": "NI", "53": "CU", "378": "SM", "260": "ZM", "231": "LR", "1": "US", "351": "PT", "673": "BN", "678": "VU", "993": "TM", "56": "CL", "63": "PH", "45": "DK", "36": "HU", "-875": "JM", "-241": "BS", "687": "NC", "967": "YE", "685": "WS", "691": "FM", "977": "NP", "290": "TA", "7": "RU", "234": "NG", "683": "NU", "353": "IE", "374": "AM", "597": "SR", "254": "KE", "265": "MW", "992": "TJ", "46": "SE", "-757": "LC", "299": "GL", "291": "ER", "43": "AT", "256": "UG", "66": "TH", "964": "IQ", "84": "VN", "264": "NA", "297": "AW", "58": "VE", "93": "AF", "34": "ES", "+1-809 and 1-829": "DO", "-868": "KN", "237": "CM", "52": "MX", "224": "GN", "350": "GI", "672": "NF", "225": "CI", "44": "GB", "507": "PA", "253": "DJ", "257": "BI", "227": "NE", "966": "SA", "680": "PW", "423": "LI", "31": "NL", "679": "FJ", "91": "IN", "230": "MU", "994": "AZ", "235": "TD", "-267": "AG", "373": "MD", "962": "JO", "676": "TO", "213": "DZ", "674": "NR", "-766": "DM", "248": "SC", "382": "ME", "95": "MM", "250": "RW", "357": "CY", "262": "RE", "39": "IT", "263": "ZW", "592": "GY", "239": "ST", "92": "PK", "355": "AL", "387": "BA", "509": "HT", "33": "FR", "356": "MT", "27": "ZA"}
0\ No newline at end of file7\ No newline at end of file
18
=== added file 'components/iso_3166_2_countries.csv'
--- components/iso_3166_2_countries.csv 1970-01-01 00:00:00 +0000
+++ components/iso_3166_2_countries.csv 2014-10-11 18:44:23 +0000
@@ -0,0 +1,269 @@
1Sort Order,Common Name,Formal Name,Type,Sub Type,Sovereignty,Capital,ISO 4217 Currency Code,ISO 4217 Currency Name,ITU-T Telephone Code,ISO 3166-1 2 Letter Code,ISO 3166-1 3 Letter Code,ISO 3166-1 Number,IANA Country Code TLD
21,Afghanistan,Islamic State of Afghanistan,Independent State,,,Kabul,AFN,Afghani,93,AF,AFG,4,.af
32,Albania,Republic of Albania,Independent State,,,Tirana,ALL,Lek,355,AL,ALB,8,.al
43,Algeria,People's Democratic Republic of Algeria,Independent State,,,Algiers,DZD,Dinar,213,DZ,DZA,12,.dz
54,Andorra,Principality of Andorra,Independent State,,,Andorra la Vella,EUR,Euro,376,AD,AND,20,.ad
65,Angola,Republic of Angola,Independent State,,,Luanda,AOA,Kwanza,244,AO,AGO,24,.ao
76,Antigua and Barbuda,,Independent State,,,Saint John's,XCD,Dollar,-267,AG,ATG,28,.ag
87,Argentina,Argentine Republic,Independent State,,,Buenos Aires,ARS,Peso,54,AR,ARG,32,.ar
98,Armenia,Republic of Armenia,Independent State,,,Yerevan,AMD,Dram,374,AM,ARM,51,.am
109,Australia,Commonwealth of Australia,Independent State,,,Canberra,AUD,Dollar,61,AU,AUS,36,.au
1110,Austria,Republic of Austria,Independent State,,,Vienna,EUR,Euro,43,AT,AUT,40,.at
1211,Azerbaijan,Republic of Azerbaijan,Independent State,,,Baku,AZN,Manat,994,AZ,AZE,31,.az
1312,"Bahamas, The",Commonwealth of The Bahamas,Independent State,,,Nassau,BSD,Dollar,-241,BS,BHS,44,.bs
1413,Bahrain,Kingdom of Bahrain,Independent State,,,Manama,BHD,Dinar,973,BH,BHR,48,.bh
1514,Bangladesh,People's Republic of Bangladesh,Independent State,,,Dhaka,BDT,Taka,880,BD,BGD,50,.bd
1615,Barbados,,Independent State,,,Bridgetown,BBD,Dollar,-245,BB,BRB,52,.bb
1716,Belarus,Republic of Belarus,Independent State,,,Minsk,BYR,Ruble,375,BY,BLR,112,.by
1817,Belgium,Kingdom of Belgium,Independent State,,,Brussels,EUR,Euro,32,BE,BEL,56,.be
1918,Belize,,Independent State,,,Belmopan,BZD,Dollar,501,BZ,BLZ,84,.bz
2019,Benin,Republic of Benin,Independent State,,,Porto-Novo,XOF,Franc,229,BJ,BEN,204,.bj
2120,Bhutan,Kingdom of Bhutan,Independent State,,,Thimphu,BTN,Ngultrum,975,BT,BTN,64,.bt
2221,Bolivia,Republic of Bolivia,Independent State,,,La Paz (administrative/legislative) and Sucre (judical),BOB,Boliviano,591,BO,BOL,68,.bo
2322,Bosnia and Herzegovina,,Independent State,,,Sarajevo,BAM,Marka,387,BA,BIH,70,.ba
2423,Botswana,Republic of Botswana,Independent State,,,Gaborone,BWP,Pula,267,BW,BWA,72,.bw
2524,Brazil,Federative Republic of Brazil,Independent State,,,Brasilia,BRL,Real,55,BR,BRA,76,.br
2625,Brunei,Negara Brunei Darussalam,Independent State,,,Bandar Seri Begawan,BND,Dollar,673,BN,BRN,96,.bn
2726,Bulgaria,Republic of Bulgaria,Independent State,,,Sofia,BGN,Lev,359,BG,BGR,100,.bg
2827,Burkina Faso,,Independent State,,,Ouagadougou,XOF,Franc,226,BF,BFA,854,.bf
2928,Burundi,Republic of Burundi,Independent State,,,Bujumbura,BIF,Franc,257,BI,BDI,108,.bi
3029,Cambodia,Kingdom of Cambodia,Independent State,,,Phnom Penh,KHR,Riels,855,KH,KHM,116,.kh
3130,Cameroon,Republic of Cameroon,Independent State,,,Yaounde,XAF,Franc,237,CM,CMR,120,.cm
3231,Canada,,Independent State,,,Ottawa,CAD,Dollar,1,CA,CAN,124,.ca
3332,Cape Verde,Republic of Cape Verde,Independent State,,,Praia,CVE,Escudo,238,CV,CPV,132,.cv
3433,Central African Republic,,Independent State,,,Bangui,XAF,Franc,236,CF,CAF,140,.cf
3534,Chad,Republic of Chad,Independent State,,,N'Djamena,XAF,Franc,235,TD,TCD,148,.td
3635,Chile,Republic of Chile,Independent State,,,Santiago (administrative/judical) and Valparaiso (legislative),CLP,Peso,56,CL,CHL,152,.cl
3736,"China, People's Republic of",People's Republic of China,Independent State,,,Beijing,CNY,Yuan Renminbi,86,CN,CHN,156,.cn
3837,Colombia,Republic of Colombia,Independent State,,,Bogota,COP,Peso,57,CO,COL,170,.co
3938,Comoros,Union of Comoros,Independent State,,,Moroni,KMF,Franc,269,KM,COM,174,.km
4039,"Congo, (Congo – Kinshasa)",Democratic Republic of the Congo,Independent State,,,Kinshasa,CDF,Franc,243,CD,COD,180,.cd
4140,"Congo, (Congo – Brazzaville)",Republic of the Congo,Independent State,,,Brazzaville,XAF,Franc,242,CG,COG,178,.cg
4241,Costa Rica,Republic of Costa Rica,Independent State,,,San Jose,CRC,Colon,506,CR,CRI,188,.cr
4342,Cote d'Ivoire (Ivory Coast),Republic of Cote d'Ivoire,Independent State,,,Yamoussoukro,XOF,Franc,225,CI,CIV,384,.ci
4443,Croatia,Republic of Croatia,Independent State,,,Zagreb,HRK,Kuna,385,HR,HRV,191,.hr
4544,Cuba,Republic of Cuba,Independent State,,,Havana,CUP,Peso,53,CU,CUB,192,.cu
4645,Cyprus,Republic of Cyprus,Independent State,,,Nicosia,CYP,Pound,357,CY,CYP,196,.cy
4746,Czech Republic,,Independent State,,,Prague,CZK,Koruna,420,CZ,CZE,203,.cz
4847,Denmark,Kingdom of Denmark,Independent State,,,Copenhagen,DKK,Krone,45,DK,DNK,208,.dk
4948,Djibouti,Republic of Djibouti,Independent State,,,Djibouti,DJF,Franc,253,DJ,DJI,262,.dj
5049,Dominica,Commonwealth of Dominica,Independent State,,,Roseau,XCD,Dollar,-766,DM,DMA,212,.dm
5150,Dominican Republic,,Independent State,,,Santo Domingo,DOP,Peso,+1-809 and 1-829,DO,DOM,214,.do
5251,Ecuador,Republic of Ecuador,Independent State,,,Quito,USD,Dollar,593,EC,ECU,218,.ec
5352,Egypt,Arab Republic of Egypt,Independent State,,,Cairo,EGP,Pound,20,EG,EGY,818,.eg
5453,El Salvador,Republic of El Salvador,Independent State,,,San Salvador,USD,Dollar,503,SV,SLV,222,.sv
5554,Equatorial Guinea,Republic of Equatorial Guinea,Independent State,,,Malabo,XAF,Franc,240,GQ,GNQ,226,.gq
5655,Eritrea,State of Eritrea,Independent State,,,Asmara,ERN,Nakfa,291,ER,ERI,232,.er
5756,Estonia,Republic of Estonia,Independent State,,,Tallinn,EEK,Kroon,372,EE,EST,233,.ee
5857,Ethiopia,Federal Democratic Republic of Ethiopia,Independent State,,,Addis Ababa,ETB,Birr,251,ET,ETH,231,.et
5958,Fiji,Republic of the Fiji Islands,Independent State,,,Suva,FJD,Dollar,679,FJ,FJI,242,.fj
6059,Finland,Republic of Finland,Independent State,,,Helsinki,EUR,Euro,358,FI,FIN,246,.fi
6160,France,French Republic,Independent State,,,Paris,EUR,Euro,33,FR,FRA,250,.fr
6261,Gabon,Gabonese Republic,Independent State,,,Libreville,XAF,Franc,241,GA,GAB,266,.ga
6362,"Gambia, The",Republic of The Gambia,Independent State,,,Banjul,GMD,Dalasi,220,GM,GMB,270,.gm
6463,Georgia,Republic of Georgia,Independent State,,,Tbilisi,GEL,Lari,995,GE,GEO,268,.ge
6564,Germany,Federal Republic of Germany,Independent State,,,Berlin,EUR,Euro,49,DE,DEU,276,.de
6665,Ghana,Republic of Ghana,Independent State,,,Accra,GHC,Cedi,233,GH,GHA,288,.gh
6766,Greece,Hellenic Republic,Independent State,,,Athens,EUR,Euro,30,GR,GRC,300,.gr
6867,Grenada,,Independent State,,,Saint George's,XCD,Dollar,-472,GD,GRD,308,.gd
6968,Guatemala,Republic of Guatemala,Independent State,,,Guatemala,GTQ,Quetzal,502,GT,GTM,320,.gt
7069,Guinea,Republic of Guinea,Independent State,,,Conakry,GNF,Franc,224,GN,GIN,324,.gn
7170,Guinea-Bissau,Republic of Guinea-Bissau,Independent State,,,Bissau,XOF,Franc,245,GW,GNB,624,.gw
7271,Guyana,Co-operative Republic of Guyana,Independent State,,,Georgetown,GYD,Dollar,592,GY,GUY,328,.gy
7372,Haiti,Republic of Haiti,Independent State,,,Port-au-Prince,HTG,Gourde,509,HT,HTI,332,.ht
7473,Honduras,Republic of Honduras,Independent State,,,Tegucigalpa,HNL,Lempira,504,HN,HND,340,.hn
7574,Hungary,Republic of Hungary,Independent State,,,Budapest,HUF,Forint,36,HU,HUN,348,.hu
7675,Iceland,Republic of Iceland,Independent State,,,Reykjavik,ISK,Krona,354,IS,ISL,352,.is
7776,India,Republic of India,Independent State,,,New Delhi,INR,Rupee,91,IN,IND,356,.in
7877,Indonesia,Republic of Indonesia,Independent State,,,Jakarta,IDR,Rupiah,62,ID,IDN,360,.id
7978,Iran,Islamic Republic of Iran,Independent State,,,Tehran,IRR,Rial,98,IR,IRN,364,.ir
8079,Iraq,Republic of Iraq,Independent State,,,Baghdad,IQD,Dinar,964,IQ,IRQ,368,.iq
8180,Ireland,,Independent State,,,Dublin,EUR,Euro,353,IE,IRL,372,.ie
8281,Israel,State of Israel,Independent State,,,Jerusalem,ILS,Shekel,972,IL,ISR,376,.il
8382,Italy,Italian Republic,Independent State,,,Rome,EUR,Euro,39,IT,ITA,380,.it
8483,Jamaica,,Independent State,,,Kingston,JMD,Dollar,-875,JM,JAM,388,.jm
8584,Japan,,Independent State,,,Tokyo,JPY,Yen,81,JP,JPN,392,.jp
8685,Jordan,Hashemite Kingdom of Jordan,Independent State,,,Amman,JOD,Dinar,962,JO,JOR,400,.jo
8786,Kazakhstan,Republic of Kazakhstan,Independent State,,,Astana,KZT,Tenge,7,KZ,KAZ,398,.kz
8887,Kenya,Republic of Kenya,Independent State,,,Nairobi,KES,Shilling,254,KE,KEN,404,.ke
8988,Kiribati,Republic of Kiribati,Independent State,,,Tarawa,AUD,Dollar,686,KI,KIR,296,.ki
9089,"Korea, North",Democratic People's Republic of Korea,Independent State,,,Pyongyang,KPW,Won,850,KP,PRK,408,.kp
9190,"Korea, South",Republic of Korea,Independent State,,,Seoul,KRW,Won,82,KR,KOR,410,.kr
9291,Kuwait,State of Kuwait,Independent State,,,Kuwait,KWD,Dinar,965,KW,KWT,414,.kw
9392,Kyrgyzstan,Kyrgyz Republic,Independent State,,,Bishkek,KGS,Som,996,KG,KGZ,417,.kg
9493,Laos,Lao People's Democratic Republic,Independent State,,,Vientiane,LAK,Kip,856,LA,LAO,418,.la
9594,Latvia,Republic of Latvia,Independent State,,,Riga,LVL,Lat,371,LV,LVA,428,.lv
9695,Lebanon,Lebanese Republic,Independent State,,,Beirut,LBP,Pound,961,LB,LBN,422,.lb
9796,Lesotho,Kingdom of Lesotho,Independent State,,,Maseru,LSL,Loti,266,LS,LSO,426,.ls
9897,Liberia,Republic of Liberia,Independent State,,,Monrovia,LRD,Dollar,231,LR,LBR,430,.lr
9998,Libya,Great Socialist People's Libyan Arab Jamahiriya,Independent State,,,Tripoli,LYD,Dinar,218,LY,LBY,434,.ly
10099,Liechtenstein,Principality of Liechtenstein,Independent State,,,Vaduz,CHF,Franc,423,LI,LIE,438,.li
101100,Lithuania,Republic of Lithuania,Independent State,,,Vilnius,LTL,Litas,370,LT,LTU,440,.lt
102101,Luxembourg,Grand Duchy of Luxembourg,Independent State,,,Luxembourg,EUR,Euro,352,LU,LUX,442,.lu
103102,Macedonia,Republic of Macedonia,Independent State,,,Skopje,MKD,Denar,389,MK,MKD,807,.mk
104103,Madagascar,Republic of Madagascar,Independent State,,,Antananarivo,MGA,Ariary,261,MG,MDG,450,.mg
105104,Malawi,Republic of Malawi,Independent State,,,Lilongwe,MWK,Kwacha,265,MW,MWI,454,.mw
106105,Malaysia,,Independent State,,,Kuala Lumpur (legislative/judical) and Putrajaya (administrative),MYR,Ringgit,60,MY,MYS,458,.my
107106,Maldives,Republic of Maldives,Independent State,,,Male,MVR,Rufiyaa,960,MV,MDV,462,.mv
108107,Mali,Republic of Mali,Independent State,,,Bamako,XOF,Franc,223,ML,MLI,466,.ml
109108,Malta,Republic of Malta,Independent State,,,Valletta,MTL,Lira,356,MT,MLT,470,.mt
110109,Marshall Islands,Republic of the Marshall Islands,Independent State,,,Majuro,USD,Dollar,692,MH,MHL,584,.mh
111110,Mauritania,Islamic Republic of Mauritania,Independent State,,,Nouakchott,MRO,Ouguiya,222,MR,MRT,478,.mr
112111,Mauritius,Republic of Mauritius,Independent State,,,Port Louis,MUR,Rupee,230,MU,MUS,480,.mu
113112,Mexico,United Mexican States,Independent State,,,Mexico,MXN,Peso,52,MX,MEX,484,.mx
114113,Micronesia,Federated States of Micronesia,Independent State,,,Palikir,USD,Dollar,691,FM,FSM,583,.fm
115114,Moldova,Republic of Moldova,Independent State,,,Chisinau,MDL,Leu,373,MD,MDA,498,.md
116115,Monaco,Principality of Monaco,Independent State,,,Monaco,EUR,Euro,377,MC,MCO,492,.mc
117116,Mongolia,,Independent State,,,Ulaanbaatar,MNT,Tugrik,976,MN,MNG,496,.mn
118117,Montenegro,Republic of Montenegro,Independent State,,,Podgorica,EUR,Euro,382,ME,MNE,499,.me and .yu
119118,Morocco,Kingdom of Morocco,Independent State,,,Rabat,MAD,Dirham,212,MA,MAR,504,.ma
120119,Mozambique,Republic of Mozambique,Independent State,,,Maputo,MZM,Meticail,258,MZ,MOZ,508,.mz
121120,Myanmar (Burma),Union of Myanmar,Independent State,,,Naypyidaw,MMK,Kyat,95,MM,MMR,104,.mm
122121,Namibia,Republic of Namibia,Independent State,,,Windhoek,NAD,Dollar,264,NA,NAM,516,.na
123122,Nauru,Republic of Nauru,Independent State,,,Yaren,AUD,Dollar,674,NR,NRU,520,.nr
124123,Nepal,,Independent State,,,Kathmandu,NPR,Rupee,977,NP,NPL,524,.np
125124,Netherlands,Kingdom of the Netherlands,Independent State,,,Amsterdam (administrative) and The Hague (legislative/judical),EUR,Euro,31,NL,NLD,528,.nl
126125,New Zealand,,Independent State,,,Wellington,NZD,Dollar,64,NZ,NZL,554,.nz
127126,Nicaragua,Republic of Nicaragua,Independent State,,,Managua,NIO,Cordoba,505,NI,NIC,558,.ni
128127,Niger,Republic of Niger,Independent State,,,Niamey,XOF,Franc,227,NE,NER,562,.ne
129128,Nigeria,Federal Republic of Nigeria,Independent State,,,Abuja,NGN,Naira,234,NG,NGA,566,.ng
130129,Norway,Kingdom of Norway,Independent State,,,Oslo,NOK,Krone,47,NO,NOR,578,.no
131130,Oman,Sultanate of Oman,Independent State,,,Muscat,OMR,Rial,968,OM,OMN,512,.om
132131,Pakistan,Islamic Republic of Pakistan,Independent State,,,Islamabad,PKR,Rupee,92,PK,PAK,586,.pk
133132,Palau,Republic of Palau,Independent State,,,Melekeok,USD,Dollar,680,PW,PLW,585,.pw
134133,Panama,Republic of Panama,Independent State,,,Panama,PAB,Balboa,507,PA,PAN,591,.pa
135134,Papua New Guinea,Independent State of Papua New Guinea,Independent State,,,Port Moresby,PGK,Kina,675,PG,PNG,598,.pg
136135,Paraguay,Republic of Paraguay,Independent State,,,Asuncion,PYG,Guarani,595,PY,PRY,600,.py
137136,Peru,Republic of Peru,Independent State,,,Lima,PEN,Sol,51,PE,PER,604,.pe
138137,Philippines,Republic of the Philippines,Independent State,,,Manila,PHP,Peso,63,PH,PHL,608,.ph
139138,Poland,Republic of Poland,Independent State,,,Warsaw,PLN,Zloty,48,PL,POL,616,.pl
140139,Portugal,Portuguese Republic,Independent State,,,Lisbon,EUR,Euro,351,PT,PRT,620,.pt
141140,Qatar,State of Qatar,Independent State,,,Doha,QAR,Rial,974,QA,QAT,634,.qa
142141,Romania,,Independent State,,,Bucharest,RON,Leu,40,RO,ROU,642,.ro
143142,Russia,Russian Federation,Independent State,,,Moscow,RUB,Ruble,7,RU,RUS,643,.ru and .su
144143,Rwanda,Republic of Rwanda,Independent State,,,Kigali,RWF,Franc,250,RW,RWA,646,.rw
145144,Saint Kitts and Nevis,Federation of Saint Kitts and Nevis,Independent State,,,Basseterre,XCD,Dollar,-868,KN,KNA,659,.kn
146145,Saint Lucia,,Independent State,,,Castries,XCD,Dollar,-757,LC,LCA,662,.lc
147146,Saint Vincent and the Grenadines,,Independent State,,,Kingstown,XCD,Dollar,-783,VC,VCT,670,.vc
148147,Samoa,Independent State of Samoa,Independent State,,,Apia,WST,Tala,685,WS,WSM,882,.ws
149148,San Marino,Republic of San Marino,Independent State,,,San Marino,EUR,Euro,378,SM,SMR,674,.sm
150149,Sao Tome and Principe,Democratic Republic of Sao Tome and Principe,Independent State,,,Sao Tome,STD,Dobra,239,ST,STP,678,.st
151150,Saudi Arabia,Kingdom of Saudi Arabia,Independent State,,,Riyadh,SAR,Rial,966,SA,SAU,682,.sa
152151,Senegal,Republic of Senegal,Independent State,,,Dakar,XOF,Franc,221,SN,SEN,686,.sn
153152,Serbia,Republic of Serbia,Independent State,,,Belgrade,RSD,Dinar,381,RS,SRB,688,.rs and .yu
154153,Seychelles,Republic of Seychelles,Independent State,,,Victoria,SCR,Rupee,248,SC,SYC,690,.sc
155154,Sierra Leone,Republic of Sierra Leone,Independent State,,,Freetown,SLL,Leone,232,SL,SLE,694,.sl
156155,Singapore,Republic of Singapore,Independent State,,,Singapore,SGD,Dollar,65,SG,SGP,702,.sg
157156,Slovakia,Slovak Republic,Independent State,,,Bratislava,SKK,Koruna,421,SK,SVK,703,.sk
158157,Slovenia,Republic of Slovenia,Independent State,,,Ljubljana,EUR,Euro,386,SI,SVN,705,.si
159158,Solomon Islands,,Independent State,,,Honiara,SBD,Dollar,677,SB,SLB,90,.sb
160159,Somalia,,Independent State,,,Mogadishu,SOS,Shilling,252,SO,SOM,706,.so
161160,South Africa,Republic of South Africa,Independent State,,,"Pretoria (administrative), Cape Town (legislative), and Bloemfontein (judical)",ZAR,Rand,27,ZA,ZAF,710,.za
162161,Spain,Kingdom of Spain,Independent State,,,Madrid,EUR,Euro,34,ES,ESP,724,.es
163162,Sri Lanka,Democratic Socialist Republic of Sri Lanka,Independent State,,,Colombo (administrative/judical) and Sri Jayewardenepura Kotte (legislative),LKR,Rupee,94,LK,LKA,144,.lk
164163,Sudan,Republic of the Sudan,Independent State,,,Khartoum,SDD,Dinar,249,SD,SDN,736,.sd
165164,Suriname,Republic of Suriname,Independent State,,,Paramaribo,SRD,Dollar,597,SR,SUR,740,.sr
166165,Swaziland,Kingdom of Swaziland,Independent State,,,Mbabane (administrative) and Lobamba (legislative),SZL,Lilangeni,268,SZ,SWZ,748,.sz
167166,Sweden,Kingdom of Sweden,Independent State,,,Stockholm,SEK,Kronoa,46,SE,SWE,752,.se
168167,Switzerland,Swiss Confederation,Independent State,,,Bern,CHF,Franc,41,CH,CHE,756,.ch
169168,Syria,Syrian Arab Republic,Independent State,,,Damascus,SYP,Pound,963,SY,SYR,760,.sy
170169,Tajikistan,Republic of Tajikistan,Independent State,,,Dushanbe,TJS,Somoni,992,TJ,TJK,762,.tj
171170,Tanzania,United Republic of Tanzania,Independent State,,,Dar es Salaam (administrative/judical) and Dodoma (legislative),TZS,Shilling,255,TZ,TZA,834,.tz
172171,Thailand,Kingdom of Thailand,Independent State,,,Bangkok,THB,Baht,66,TH,THA,764,.th
173172,Timor-Leste (East Timor),Democratic Republic of Timor-Leste,Independent State,,,Dili,USD,Dollar,670,TL,TLS,626,.tp and .tl
174173,Togo,Togolese Republic,Independent State,,,Lome,XOF,Franc,228,TG,TGO,768,.tg
175174,Tonga,Kingdom of Tonga,Independent State,,,Nuku'alofa,TOP,Pa'anga,676,TO,TON,776,.to
176175,Trinidad and Tobago,Republic of Trinidad and Tobago,Independent State,,,Port-of-Spain,TTD,Dollar,-867,TT,TTO,780,.tt
177176,Tunisia,Tunisian Republic,Independent State,,,Tunis,TND,Dinar,216,TN,TUN,788,.tn
178177,Turkey,Republic of Turkey,Independent State,,,Ankara,TRY,Lira,90,TR,TUR,792,.tr
179178,Turkmenistan,,Independent State,,,Ashgabat,TMM,Manat,993,TM,TKM,795,.tm
180179,Tuvalu,,Independent State,,,Funafuti,AUD,Dollar,688,TV,TUV,798,.tv
181180,Uganda,Republic of Uganda,Independent State,,,Kampala,UGX,Shilling,256,UG,UGA,800,.ug
182181,Ukraine,,Independent State,,,Kiev,UAH,Hryvnia,380,UA,UKR,804,.ua
183182,United Arab Emirates,United Arab Emirates,Independent State,,,Abu Dhabi,AED,Dirham,971,AE,ARE,784,.ae
184183,Jersey,Bailiwick of Jersey,Dependency,Crown Dependency,United Kingdom,Saint Helier,JEP,Pound,44,JE,JEY,832,.je
185184,United States,United States of America,Independent State,,,Washington,USD,Dollar,1,US,USA,840,.us
186185,Uruguay,Oriental Republic of Uruguay,Independent State,,,Montevideo,UYU,Peso,598,UY,URY,858,.uy
187186,Uzbekistan,Republic of Uzbekistan,Independent State,,,Tashkent,UZS,Som,998,UZ,UZB,860,.uz
188187,Vanuatu,Republic of Vanuatu,Independent State,,,Port-Vila,VUV,Vatu,678,VU,VUT,548,.vu
189188,Vatican City,State of the Vatican City,Independent State,,,Vatican City,EUR,Euro,379,VA,VAT,336,.va
190189,Venezuela,Bolivarian Republic of Venezuela,Independent State,,,Caracas,VEB,Bolivar,58,VE,VEN,862,.ve
191190,Vietnam,Socialist Republic of Vietnam,Independent State,,,Hanoi,VND,Dong,84,VN,VNM,704,.vn
192191,Yemen,Republic of Yemen,Independent State,,,Sanaa,YER,Rial,967,YE,YEM,887,.ye
193192,Zambia,Republic of Zambia,Independent State,,,Lusaka,ZMK,Kwacha,260,ZM,ZMB,894,.zm
194193,Zimbabwe,Republic of Zimbabwe,Independent State,,,Harare,ZWD,Dollar,263,ZW,ZWE,716,.zw
195194,Abkhazia,Republic of Abkhazia,Proto Independent State,,,Sokhumi,RUB,Ruble,995,GE,GEO,268,.ge
196195,"China, Republic of (Taiwan)",Republic of China,Proto Independent State,,,Taipei,TWD,Dollar,886,TW,TWN,158,.tw
197196,Nagorno-Karabakh,Nagorno-Karabakh Republic,Proto Independent State,,,Stepanakert,AMD,Dram,277,AZ,AZE,31,.az
198197,Northern Cyprus,Turkish Republic of Northern Cyprus,Proto Independent State,,,Nicosia,TRY,Lira,-302,CY,CYP,196,.nc.tr
199198,Pridnestrovie (Transnistria),Pridnestrovian Moldavian Republic,Proto Independent State,,,Tiraspol,,Ruple,-160,MD,MDA,498,.md
200199,Somaliland,Republic of Somaliland,Proto Independent State,,,Hargeisa,,Shilling,252,SO,SOM,706,.so
201200,South Ossetia,Republic of South Ossetia,Proto Independent State,,,Tskhinvali,RUB and GEL,Ruble and Lari,995,GE,GEO,268,.ge
202201,Ashmore and Cartier Islands,Territory of Ashmore and Cartier Islands,Dependency,External Territory,Australia,,,,,AU,AUS,36,.au
203202,Christmas Island,Territory of Christmas Island,Dependency,External Territory,Australia,The Settlement (Flying Fish Cove),AUD,Dollar,61,CX,CXR,162,.cx
204203,Cocos (Keeling) Islands,Territory of Cocos (Keeling) Islands,Dependency,External Territory,Australia,West Island,AUD,Dollar,61,CC,CCK,166,.cc
205204,Coral Sea Islands,Coral Sea Islands Territory,Dependency,External Territory,Australia,,,,,AU,AUS,36,.au
206205,Heard Island and McDonald Islands,Territory of Heard Island and McDonald Islands,Dependency,External Territory,Australia,,,,,HM,HMD,334,.hm
207206,Norfolk Island,Territory of Norfolk Island,Dependency,External Territory,Australia,Kingston,AUD,Dollar,672,NF,NFK,574,.nf
208207,New Caledonia,,Dependency,Sui generis Collectivity,France,Noumea,XPF,Franc,687,NC,NCL,540,.nc
209208,French Polynesia,Overseas Country of French Polynesia,Dependency,Overseas Collectivity,France,Papeete,XPF,Franc,689,PF,PYF,258,.pf
210209,Mayotte,Departmental Collectivity of Mayotte,Dependency,Overseas Collectivity,France,Mamoudzou,EUR,Euro,262,YT,MYT,175,.yt
211210,Saint Barthelemy,Collectivity of Saint Barthelemy,Dependency,Overseas Collectivity,France,Gustavia,EUR,Euro,590,GP,GLP,312,.gp
212211,Saint Martin,Collectivity of Saint Martin,Dependency,Overseas Collectivity,France,Marigot,EUR,Euro,590,GP,GLP,312,.gp
213212,Saint Pierre and Miquelon,Territorial Collectivity of Saint Pierre and Miquelon,Dependency,Overseas Collectivity,France,Saint-Pierre,EUR,Euro,508,PM,SPM,666,.pm
214213,Wallis and Futuna,Collectivity of the Wallis and Futuna Islands,Dependency,Overseas Collectivity,France,Mata'utu,XPF,Franc,681,WF,WLF,876,.wf
215214,French Southern and Antarctic Lands,Territory of the French Southern and Antarctic Lands,Dependency,Overseas Territory,France,Martin-de-Viviès,,,,TF,ATF,260,.tf
216215,Clipperton Island,,Dependency,Possession,France,,,,,PF,PYF,258,.pf
217216,Bouvet Island,,Dependency,Territory,Norway,,,,,BV,BVT,74,.bv
218217,Cook Islands,,Dependency,Self-Governing in Free Association,New Zealand,Avarua,NZD,Dollar,682,CK,COK,184,.ck
219218,Niue,,Dependency,Self-Governing in Free Association,New Zealand,Alofi,NZD,Dollar,683,NU,NIU,570,.nu
220219,Tokelau,,Dependency,Territory,New Zealand,,NZD,Dollar,690,TK,TKL,772,.tk
221220,Guernsey,Bailiwick of Guernsey,Dependency,Crown Dependency,United Kingdom,Saint Peter Port,GGP,Pound,44,GG,GGY,831,.gg
222221,Isle of Man,,Dependency,Crown Dependency,United Kingdom,Douglas,IMP,Pound,44,IM,IMN,833,.im
223222,United Kingdom,United Kingdom of Great Britain and Northern Ireland,Independent State,,,London,GBP,Pound,44,GB,GBR,826,.uk
224223,Anguilla,,Dependency,Overseas Territory,United Kingdom,The Valley,XCD,Dollar,-263,AI,AIA,660,.ai
225224,Bermuda,,Dependency,Overseas Territory,United Kingdom,Hamilton,BMD,Dollar,-440,BM,BMU,60,.bm
226225,British Indian Ocean Territory,,Dependency,Overseas Territory,United Kingdom,,,,246,IO,IOT,86,.io
227226,British Sovereign Base Areas,,Dependency,Overseas Territory,United Kingdom,Episkopi,CYP,Pound,357,,,,
228227,British Virgin Islands,,Dependency,Overseas Territory,United Kingdom,Road Town,USD,Dollar,-283,VG,VGB,92,.vg
229228,Cayman Islands,,Dependency,Overseas Territory,United Kingdom,George Town,KYD,Dollar,-344,KY,CYM,136,.ky
230229,Falkland Islands (Islas Malvinas),,Dependency,Overseas Territory,United Kingdom,Stanley,FKP,Pound,500,FK,FLK,238,.fk
231230,Gibraltar,,Dependency,Overseas Territory,United Kingdom,Gibraltar,GIP,Pound,350,GI,GIB,292,.gi
232231,Montserrat,,Dependency,Overseas Territory,United Kingdom,Plymouth,XCD,Dollar,-663,MS,MSR,500,.ms
233232,Pitcairn Islands,,Dependency,Overseas Territory,United Kingdom,Adamstown,NZD,Dollar,,PN,PCN,612,.pn
234233,Saint Helena,,Dependency,Overseas Territory,United Kingdom,Jamestown,SHP,Pound,290,SH,SHN,654,.sh
235234,South Georgia & South Sandwich Islands,,Dependency,Overseas Territory,United Kingdom,,,,,GS,SGS,239,.gs
236235,Turks and Caicos Islands,,Dependency,Overseas Territory,United Kingdom,Grand Turk,USD,Dollar,-648,TC,TCA,796,.tc
237236,Northern Mariana Islands,Commonwealth of The Northern Mariana Islands,Dependency,Commonwealth,United States,Saipan,USD,Dollar,-669,MP,MNP,580,.mp
238237,Puerto Rico,Commonwealth of Puerto Rico,Dependency,Commonwealth,United States,San Juan,USD,Dollar,+1-787 and 1-939,PR,PRI,630,.pr
239238,American Samoa,Territory of American Samoa,Dependency,Territory,United States,Pago Pago,USD,Dollar,-683,AS,ASM,16,.as
240239,Baker Island,,Dependency,Territory,United States,,,,,UM,UMI,581,
241240,Guam,Territory of Guam,Dependency,Territory,United States,Hagatna,USD,Dollar,-670,GU,GUM,316,.gu
242241,Howland Island,,Dependency,Territory,United States,,,,,UM,UMI,581,
243242,Jarvis Island,,Dependency,Territory,United States,,,,,UM,UMI,581,
244243,Johnston Atoll,,Dependency,Territory,United States,,,,,UM,UMI,581,
245244,Kingman Reef,,Dependency,Territory,United States,,,,,UM,UMI,581,
246245,Midway Islands,,Dependency,Territory,United States,,,,,UM,UMI,581,
247246,Navassa Island,,Dependency,Territory,United States,,,,,UM,UMI,581,
248247,Palmyra Atoll,,Dependency,Territory,United States,,,,,UM,UMI,581,
249248,U.S. Virgin Islands,United States Virgin Islands,Dependency,Territory,United States,Charlotte Amalie,USD,Dollar,-339,VI,VIR,850,.vi
250249,Wake Island,,Dependency,Territory,United States,,,,,UM,UMI,850,
251250,Hong Kong,Hong Kong Special Administrative Region,Proto Dependency,Special Administrative Region,China,,HKD,Dollar,852,HK,HKG,344,.hk
252251,Macau,Macau Special Administrative Region,Proto Dependency,Special Administrative Region,China,Macau,MOP,Pataca,853,MO,MAC,446,.mo
253252,Faroe Islands,,Proto Dependency,,Denmark,Torshavn,DKK,Krone,298,FO,FRO,234,.fo
254253,Greenland,,Proto Dependency,,Denmark,Nuuk (Godthab),DKK,Krone,299,GL,GRL,304,.gl
255254,French Guiana,Overseas Region of Guiana,Proto Dependency,Overseas Region,France,Cayenne,EUR,Euro,594,GF,GUF,254,.gf
256255,Guadeloupe,Overseas Region of Guadeloupe,Proto Dependency,Overseas Region,France,Basse-Terre,EUR,Euro,590,GP,GLP,312,.gp
257256,Martinique,Overseas Region of Martinique,Proto Dependency,Overseas Region,France,Fort-de-France,EUR,Euro,596,MQ,MTQ,474,.mq
258257,Reunion,Overseas Region of Reunion,Proto Dependency,Overseas Region,France,Saint-Denis,EUR,Euro,262,RE,REU,638,.re
259258,Aland,,Proto Dependency,,Finland,Mariehamn,EUR,Euro,340,AX,ALA,248,.ax
260259,Aruba,,Proto Dependency,,Netherlands,Oranjestad,AWG,Guilder,297,AW,ABW,533,.aw
261260,Netherlands Antilles,,Proto Dependency,,Netherlands,Willemstad,ANG,Guilder,599,AN,ANT,530,.an
262261,Svalbard,,Proto Dependency,,Norway,Longyearbyen,NOK,Krone,47,SJ,SJM,744,.sj
263262,Ascension,,Proto Dependency,Dependency of Saint Helena,United Kingdom,Georgetown,SHP,Pound,247,AC,ASC,,.ac
264263,Tristan da Cunha,,Proto Dependency,Dependency of Saint Helena,United Kingdom,Edinburgh,SHP,Pound,290,TA,TAA,,
265268,Australian Antarctic Territory,,Antarctic Territory,External Territory,Australia,,,,,AQ,ATA,10,.aq
266269,Ross Dependency,,Antarctic Territory,Territory,New Zealand,,,,,AQ,ATA,10,.aq
267270,Peter I Island,,Antarctic Territory,Territory,Norway,,,,,AQ,ATA,10,.aq
268271,Queen Maud Land,,Antarctic Territory,Territory,Norway,,,,,AQ,ATA,10,.aq
269272,British Antarctic Territory,,Antarctic Territory,Overseas Territory,United Kingdom,,,,,AQ,ATA,10,.aq
0270
=== added directory 'components/listitems'
=== added file 'components/listitems/CMakeLists.txt'
--- components/listitems/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ components/listitems/CMakeLists.txt 2014-10-11 18:44:23 +0000
@@ -0,0 +1,7 @@
1file(GLOB LISTITEMS_QML_JS_FILES *.qml *.js)
2
3# make the files visible in the qtcreator tree
4add_custom_target(telegram_listitems_QMlFiles ALL SOURCES ${LISTITEMS_QML_JS_FILES})
5
6install(FILES ${LISTITEMS_QML_JS_FILES} DESTINATION ${TELEGRAM_DIR}/components/listitems)
7install(DIRECTORY "artwork" DESTINATION ${TELEGRAM_DIR}/components/listitems)
08
=== added file 'components/listitems/DlgItem.qml'
--- components/listitems/DlgItem.qml 1970-01-01 00:00:00 +0000
+++ components/listitems/DlgItem.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,15 @@
1import QtQuick 2.0
2
3DlgItemDesign {
4
5 onClicked: {
6 console.log("INDEX" + index);
7 console.log("element:" + telegramClient.dialogsModel.get(index));
8 dialogPage.peerId = telegramClient.dialogsModel.get(index).id;
9 dialogPage.peerIsChat = telegramClient.dialogsModel.get(index).isChat;
10 pageStack.showPage(dialogPage);
11
12 console.log("ID:" + dialogPage.peerId);
13 console.log("ISCHAT" + dialogPage.peerIsChat);
14 }
15}
016
=== added file 'components/listitems/DlgItemDesign.qml'
--- components/listitems/DlgItemDesign.qml 1970-01-01 00:00:00 +0000
+++ components/listitems/DlgItemDesign.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,226 @@
1import QtQuick 2.0
2import Ubuntu.Components 0.1
3import Ubuntu.Components.ListItems 0.1
4
5
6Empty {
7 id: baseListItem
8
9 /*!
10 \preliminary
11 The location of the icon to show in the list item (optional), or an Item that is
12 shown on the left side inside the list item. The icon will automatically be
13 anchored to the left side of the list item, and if its height is undefined, to the top
14 and bottom of the list item.
15 \qmlproperty variant icon
16 */
17 property variant icon
18
19 /*!
20 \preliminary
21 The location of the icon to show in the list item if iconSource failed to load (optional).
22 \qmlproperty url fallbackIconSource
23 */
24 property alias fallbackIconSource: iconHelper.fallbackSource
25
26 /*!
27 \preliminary
28 Show or hide the frame around the icon
29 \qmlproperty bool iconFrame
30 */
31 property alias iconFrame: iconHelper.hasFrame
32
33 /*!
34 \preliminary
35 The text that is shown in the list item as a label.
36 \qmlproperty string text
37 */
38 property alias text: label.text
39
40 /*!
41 \preliminary
42 The list of strings that will be shown under the label text
43 \qmlproperty string subText
44 */
45 property alias subText: subLabel.text
46
47 property alias date: date.text
48
49 property alias unread: unread.text
50
51 __height: Math.max(middleVisuals.height, units.gu(6))
52
53 __contentsMargins: units.gu(1)
54
55 property bool __iconIsItem: false
56
57 /*!
58 \internal
59 */
60 onIconChanged: {
61 __iconIsItem = (typeof icon != "string")
62 if (typeof icon == "string") {
63 // icon is the url of an image
64 iconHelper.source = icon;
65 __iconIsItem = false;
66 } else {
67 // icon is an Item.
68 __iconIsItem = true;
69 iconHelper.source = "";
70
71// icon.parent = baseListItem;
72// icon.anchors.left = baseListItem.left;
73// icon.anchors.margins = Qt.binding(function() { return baseListItem.__contentsMargins });
74// if (!icon.height) {
75// icon.anchors.top = baseListItem.top;
76// icon.anchors.bottom = baseListItem.bottom;
77// }
78 }
79 }
80
81 /*!
82 \internal
83 */
84 property alias children: middle.children
85
86 IconVisual {
87 id: iconHelper
88 width: height
89 height: Math.min(units.gu(5), parent.height - units.gu(1))
90 anchors {
91 left: parent.left
92 leftMargin: baseListItem.__contentsMargins
93 verticalCenter: parent.verticalCenter
94 }
95 }
96
97
98 Item {
99 id: middle
100 anchors {
101 top: parent.top
102 bottom: parent.bottom
103 left: iconHelper.right
104 right: parent.right
105 rightMargin: baseListItem.__contentsMargins
106 leftMargin: baseListItem.__contentsMargins
107 }
108
109 Item {
110 id: middleVisuals
111 anchors {
112 left: parent.left
113 right: parent.right
114 verticalCenter: parent.verticalCenter
115 }
116
117 height: childrenRect.height + labelRect.anchors.topMargin + subLabelRect.anchors.bottomMargin
118
119 Item {
120 id: upRow
121 anchors {
122 top: parent.top
123 left: parent.left
124 right: parent.right
125 }
126
127 height: iconHelper.height / 2.5
128
129 Item {
130 id: labelRect
131 anchors {
132 left: parent.left
133 right: dateRect.left
134 }
135 height: parent.height
136 width: childrenRect.width
137
138 LabelVisual {
139 anchors.fill: parent
140 id: label
141 font.weight: Font.Bold
142 wrapMode: Text.WrapAnywhere
143 maximumLineCount: 1
144 verticalAlignment: Text.AlignVCenter
145 horizontalAlignment: Text.AlignLeft
146 }
147 }
148
149 Item {
150 id: dateRect
151 anchors {
152 right: parent.right
153 }
154 height: parent.height
155 width: childrenRect.width
156
157 LabelVisual {
158 id: date
159 fontSize: "x-small"
160 wrapMode: Text.NoWrap
161 maximumLineCount: 1
162 verticalAlignment: Text.AlignVCenter
163 horizontalAlignment: Text.AlignHCenter
164 }
165 }
166
167 }
168
169
170 Item {
171 id: downRow
172 anchors {
173 top: upRow.bottom
174 left: parent.left
175 right: parent.right
176 }
177
178 height: iconHelper.height / 2.5
179
180 Item {
181 id: subLabelRect
182 anchors {
183 left: parent.left
184 right: unreadRect.left
185 }
186 height: parent.height
187 width: childrenRect.width
188
189 LabelVisual {
190 id: subLabel
191 anchors.fill: parent
192 fontSize: "small"
193 wrapMode: Text.WrapAnywhere
194 maximumLineCount: 1
195 verticalAlignment: Text.AlignBottom
196 horizontalAlignment: Text.AlignLeft
197 }
198 }
199
200 Rectangle {
201 id: unreadRect
202 anchors {
203 right: parent.right
204 }
205 visible: unread.text > '0'
206 color: "lightgreen"
207 height: parent.height
208 width: height//childrenRect.width
209
210 LabelVisual {
211 id: unread
212 anchors.fill: parent
213 fontSize: "x-small"
214 wrapMode: Text.NoWrap
215 maximumLineCount: 1
216 verticalAlignment: Text.AlignVCenter
217 horizontalAlignment: Text.AlignHCenter
218 }
219 }
220 }
221
222 }
223 }
224
225
226}
0227
=== added file 'components/listitems/IconVisual.qml'
--- components/listitems/IconVisual.qml 1970-01-01 00:00:00 +0000
+++ components/listitems/IconVisual.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,52 @@
1/*
2 * Copyright 2012 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import Ubuntu.Components 0.1
19
20// internal helper class to create the visuals
21// for the icon.
22Item {
23 id: iconVisual
24
25 /*!
26 \qmlproperty url source
27 */
28 property alias source: icon.source
29 /*!
30 \qmlproperty url fallbackSource
31 */
32 property alias fallbackSource: icon.fallbackSource
33 visible: source != ""
34 property bool hasFrame: true
35
36 ImageWithFallback {
37 id: icon
38 visible: !iconVisual.hasFrame
39 opacity: iconVisual.enabled ? 1.0 : 0.5
40 fillMode: Image.PreserveAspectCrop
41 anchors.fill: parent
42 smooth: true
43 asynchronous: true
44 }
45
46 UbuntuShape {
47 id: shape
48 visible: iconVisual.hasFrame
49 anchors.fill: parent
50 image: icon
51 }
52}
053
=== added file 'components/listitems/ImageWithFallback.qml'
--- components/listitems/ImageWithFallback.qml 1970-01-01 00:00:00 +0000
+++ components/listitems/ImageWithFallback.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,46 @@
1/*
2 * Copyright 2012 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18
19Image {
20 id: image
21
22 property url fallbackSource
23 property bool fallbackRequired: false
24
25 function isSourceDefined(sourceUrl) {
26 return sourceUrl != "" && sourceUrl != undefined
27 }
28
29 function tryLoadingFallbackSource() {
30 if (isSourceDefined(fallbackSource)) {
31 source = fallbackSource
32 }
33 }
34
35 function checkStatus() {
36 if (!isSourceDefined(source) || (status == Image.Error && source != fallbackSource)) {
37 fallbackRequired = true
38 tryLoadingFallbackSource()
39 }
40 }
41
42 onSourceChanged: fallbackRequired = false
43 onFallbackSourceChanged: if (fallbackRequired) tryLoadingFallbackSource()
44 onStatusChanged: checkStatus()
45 Component.onCompleted: checkStatus()
46}
047
=== added file 'components/listitems/LabelVisual.qml'
--- components/listitems/LabelVisual.qml 1970-01-01 00:00:00 +0000
+++ components/listitems/LabelVisual.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,38 @@
1/*
2 * Copyright 2012 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18import Ubuntu.Components 0.1
19
20// internal helper class for text inside the list items.
21Label {
22 id: label
23 property bool selected: false
24 property bool secondary: false
25
26 // FIXME: very ugly hack to detect whether the list item is inside a Popover
27 property bool overlay: isInsideOverlay(label)
28 function isInsideOverlay(item) {
29 if (!item.parent) return false;
30 return item.parent.hasOwnProperty("pointerTarget") || label.isInsideOverlay(item.parent)
31 }
32
33 fontSize: "medium"
34 elide: Text.ElideRight
35 color: selected ? UbuntuColors.orange : secondary ? overlay ? Theme.palette.normal.overlayText : Theme.palette.normal.backgroundText
36 : overlay ? Theme.palette.selected.overlayText : Theme.palette.selected.backgroundText
37 opacity: label.enabled ? 1.0 : 0.5
38}
039
=== added file 'components/listitems/ProgressionVisual.qml'
--- components/listitems/ProgressionVisual.qml 1970-01-01 00:00:00 +0000
+++ components/listitems/ProgressionVisual.qml 2014-10-11 18:44:23 +0000
@@ -0,0 +1,52 @@
1/*
2 * Copyright 2012 Canonical Ltd.
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; version 3.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU Lesser General Public License for more details.
12 *
13 * You should have received a copy of the GNU Lesser General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17import QtQuick 2.0
18
19// Internal helper class for the visuals of
20// the progression symbol.
21Item {
22 id: progressionVisual
23
24 width: progressIcon.width + (showSplit ? splitMargin + progressionDivider.width : 0)
25
26 property bool showSplit: false
27 property real splitMargin
28
29 Image {
30 id: progressIcon
31 source: "artwork/ListItemProgressionArrow.png"
32 anchors {
33 verticalCenter: parent.verticalCenter
34 right: parent.right
35 }
36
37 opacity: enabled ? 1.0 : 0.5
38 }
39
40 Image {
41 id: progressionDivider
42 visible: progressionVisual.showSplit
43 anchors {
44 top: parent.top
45 bottom: parent.bottom
46 right: progressIcon.left
47 rightMargin: splitMargin
48 }
49 source: "artwork/ListItemDividerVertical.png"
50 opacity: enabled ? 1.0 : 0.5
51 }
52}
053
=== added directory 'components/listitems/artwork'
=== added file 'components/listitems/artwork/ListItemDivider24px@8.png'
1Binary files components/listitems/artwork/ListItemDivider24px@8.png 1970-01-01 00:00:00 +0000 and components/listitems/artwork/ListItemDivider24px@8.png 2014-10-11 18:44:23 +0000 differ54Binary files components/listitems/artwork/ListItemDivider24px@8.png 1970-01-01 00:00:00 +0000 and components/listitems/artwork/ListItemDivider24px@8.png 2014-10-11 18:44:23 +0000 differ
=== added file 'components/listitems/artwork/ListItemDivider6px@8.png'
2Binary files components/listitems/artwork/ListItemDivider6px@8.png 1970-01-01 00:00:00 +0000 and components/listitems/artwork/ListItemDivider6px@8.png 2014-10-11 18:44:23 +0000 differ55Binary files components/listitems/artwork/ListItemDivider6px@8.png 1970-01-01 00:00:00 +0000 and components/listitems/artwork/ListItemDivider6px@8.png 2014-10-11 18:44:23 +0000 differ
=== added file 'components/listitems/artwork/ListItemDividerHorizontal@18.png'
3Binary files components/listitems/artwork/ListItemDividerHorizontal@18.png 1970-01-01 00:00:00 +0000 and components/listitems/artwork/ListItemDividerHorizontal@18.png 2014-10-11 18:44:23 +0000 differ56Binary files components/listitems/artwork/ListItemDividerHorizontal@18.png 1970-01-01 00:00:00 +0000 and components/listitems/artwork/ListItemDividerHorizontal@18.png 2014-10-11 18:44:23 +0000 differ
=== added file 'components/listitems/artwork/ListItemDividerVertical@18.png'
4Binary files components/listitems/artwork/ListItemDividerVertical@18.png 1970-01-01 00:00:00 +0000 and components/listitems/artwork/ListItemDividerVertical@18.png 2014-10-11 18:44:23 +0000 differ57Binary files components/listitems/artwork/ListItemDividerVertical@18.png 1970-01-01 00:00:00 +0000 and components/listitems/artwork/ListItemDividerVertical@18.png 2014-10-11 18:44:23 +0000 differ
=== added file 'components/listitems/artwork/ListItemProgressionArrow@8.png'
5Binary files components/listitems/artwork/ListItemProgressionArrow@8.png 1970-01-01 00:00:00 +0000 and components/listitems/artwork/ListItemProgressionArrow@8.png 2014-10-11 18:44:23 +0000 differ58Binary files components/listitems/artwork/ListItemProgressionArrow@8.png 1970-01-01 00:00:00 +0000 and components/listitems/artwork/ListItemProgressionArrow@8.png 2014-10-11 18:44:23 +0000 differ
=== added file 'components/listitems/artwork/delete@8.png'
6Binary files components/listitems/artwork/delete@8.png 1970-01-01 00:00:00 +0000 and components/listitems/artwork/delete@8.png 2014-10-11 18:44:23 +0000 differ59Binary files components/listitems/artwork/delete@8.png 1970-01-01 00:00:00 +0000 and components/listitems/artwork/delete@8.png 2014-10-11 18:44:23 +0000 differ
=== added file 'countries.py'
--- countries.py 1970-01-01 00:00:00 +0000
+++ countries.py 2014-10-11 18:44:23 +0000
@@ -0,0 +1,52 @@
1#!/usr/bin/env python3
2
3import csv
4import simplejson as json
5import operator
6
7def dump_json():
8 name_to_tel = {}
9 name_to_iso = {}
10 iso_to_name = {}
11 iso_to_tel = {}
12 tel_to_name = {}
13 tel_to_iso = {}
14
15 with open('components/iso_3166_2_countries.csv', encoding="utf-8") as f:
16 reader = csv.reader(f)
17 for row in reader:
18 name = row[1]
19 iso = row[10] # two letter country code
20 tel = row[9]
21
22 if not tel or not iso:
23 continue
24
25 name_to_tel[name] = tel
26 name_to_iso[name] = iso
27 iso_to_name[iso] = name
28 iso_to_tel[iso] = tel
29 tel_to_name[tel] = name
30 tel_to_iso[tel] = iso
31
32 with open('components/country_data.js', 'w') as f:
33 f.write("var name_to_tel = ")
34 f.write(json.dumps(name_to_tel))
35 f.write(";\n")
36 f.write("var name_to_iso = ")
37 f.write(json.dumps(name_to_iso))
38 f.write(";\n")
39 f.write("var iso_to_name = ")
40 f.write(json.dumps(iso_to_name))
41 f.write(";\n")
42 f.write("var iso_to_tel = ")
43 f.write(json.dumps(iso_to_tel))
44 f.write(";\n")
45 f.write("var tel_to_name = ")
46 f.write(json.dumps(tel_to_name))
47 f.write(";\n")
48 f.write("var tel_to_iso = ")
49 f.write(json.dumps(tel_to_iso))
50
51if __name__ == "__main__":
52 dump_json()
053
=== added file 'debug.md'
--- debug.md 1970-01-01 00:00:00 +0000
+++ debug.md 2014-10-11 18:44:23 +0000
@@ -0,0 +1,110 @@
1====================
2Some debugging notes
3====================
4
5This document is still a work in progress.
6
7Here are some very rough notes on how to set up Telegram for debugging.
8
9Build the library in debug mode
10===============================
11Append to the cmake line in build.sh:
12
13 ${SDK_PATH}/qtc_chroot_cmake ${CLICK_SDK_ARCH} ${CLICK_SDK_FRAMEWORK} $SERIES ../.. -DCMAKE_BUILD_TYPE=Debug
14
15
16gdb + debug symbols
17===================
18When stepping through a stack trace in gdb, it may be useful to have debug
19symbols for the Qt libraries.
20
21In Ubuntu, the debug symbol packages are built and hosted on a different
22server from the standard source and binary packages. To get them:
23
24 echo "deb http://ddebs.ubuntu.com $(lsb_release -cs) main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ddebs.list
25 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 428D7C01
26
27And then of course, issue ``sudo apt-get update``.
28
29The next step is to install the symbol packages. The package names correspond
30to the binary package names, with "-dbgsym" appended. For example, to get
31the symbols for qtbase5-dev:
32
33 sudo apt-get install qtbase5-dev-dbgsym
34
35Beware that the symbols can be quite large in terms of disk space, and it is
36assumed you are debugging with gdb on your desktop, where storage is less of
37an issue than a device.
38
39Finally, understand that installing debug symbols only partially improves
40the debugging experience in gdb. An additional nicety is to install the
41actual library source, so that you can easily view source code from gdb
42itself.
43
44Here is one technique to do so. First, download the actual source for the
45package you are interested in:
46
47 mkdir debug
48 cd debug
49 apt-get source qtbase5-dev
50 cd ..
51
52Next, you must start gdb properly so it knows how to find the new source
53files. The key rune below is: ``find debug -type d -printf '-d %p'``
54
55 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:build/amd64/library/lib QML2_IMPORT_PATH=build/amd64/library/qmlplugin gdb qmlscene `find debug -type d -printf '-d %p '`
56
57After starting gdb, just a few extra commands, and you are on your
58way:
59
60 set args telegram.qml
61 r
62
63Now, when you get a crash and inspect the stack trace, you can view the
64source:
65
66 (gdb) bt
67 #0 0x00007ffff5232117 in __GI_raise (sig=sig@entry=6)
68 at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
69 #1 0x00007ffff5233808 in __GI_abort () at abort.c:89
70 #2 0x00007ffff5273fd4 in __libc_message (do_abort=do_abort@entry=1,
71 fmt=fmt@entry=0x7ffff537dba8 "*** Error in `%s': %s: 0x%s ***\n")
72 at ../sysdeps/posix/libc_fatal.c:175
73 #3 0x00007ffff527b5e6 in malloc_printerr (ptr=<optimized out>,
74 str=0x7ffff537dc90 "double free or corruption (!prev)", action=1)
75 at malloc.c:4996
76 #4 _int_free (av=<optimized out>, p=<optimized out>, have_lock=0)
77 at malloc.c:3840
78 #5 0x00007ffff5ec9608 in QObject::event (this=0xc32780, e=<optimized out>)
79 at kernel/qobject.cpp:1232
80
81 (gdb) frame 5
82 #5 0x00007ffff5ec9608 in QObject::event (this=0xc32780, e=<optimized out>)
83 at kernel/qobject.cpp:1232
84 1232 qDeleteInEventHandler(this);
85 (gdb) l
86 1227 case QEvent::ChildRemoved:
87 1228 childEvent((QChildEvent*)e);
88 1229 break;
89 1230
90 1231 case QEvent::DeferredDelete:
91 1232 qDeleteInEventHandler(this);
92 1233 break;
93 1234
94 1235 case QEvent::MetaCall:
95 1236 {
96
97
98Running with valgrind
99=====================
100Valgrind is a suite of tools, one of which is memcheck, which can be used to
101detect memory leaks. Running it can be a bit complex, but this rune should
102help:
103
104 LD_LIBRARY_PATH=$LD_LIBRARY_PATH:build/amd64/library/lib QML2_IMPORT_PATH=build/amd64/library/qmlplugin G_SLICE=always-malloc G_DEBUG=gc-friendly valgrind -v --tool=memcheck --leak-check=full --num-callers=40 --log-file=valgrind.log --track-origins=yes --trace-children=yes qmlscene telegram.qml
105
106If you find the log to be noisy, you may wish to suppress some of the
107warnings. Google for "valgrind suppressions" for the details. In the above
108rune, you can add ``--gen-suppressions=all`` to generate suppressions.
109
110Check out the ``tools/extract_suppressions.sh`` script and go from there.
0111
=== added directory 'images'
=== added file 'images/background_hd.jpg'
1Binary files images/background_hd.jpg 1970-01-01 00:00:00 +0000 and images/background_hd.jpg 2014-10-11 18:44:23 +0000 differ112Binary files images/background_hd.jpg 1970-01-01 00:00:00 +0000 and images/background_hd.jpg 2014-10-11 18:44:23 +0000 differ
=== added file 'images/call.png'
2Binary files images/call.png 1970-01-01 00:00:00 +0000 and images/call.png 2014-10-11 18:44:23 +0000 differ113Binary files images/call.png 1970-01-01 00:00:00 +0000 and images/call.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/conversation_incoming@27.png'
3Binary files images/conversation_incoming@27.png 1970-01-01 00:00:00 +0000 and images/conversation_incoming@27.png 2014-10-11 18:44:23 +0000 differ114Binary files images/conversation_incoming@27.png 1970-01-01 00:00:00 +0000 and images/conversation_incoming@27.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/conversation_incoming@27.sci'
--- images/conversation_incoming@27.sci 1970-01-01 00:00:00 +0000
+++ images/conversation_incoming@27.sci 2014-10-11 18:44:23 +0000
@@ -0,0 +1,5 @@
1border.left: 63
2border.top: 46
3border.bottom: 88
4border.right: 44
5source: conversation_incoming@27.png
06
=== added file 'images/conversation_outgoing@27.png'
1Binary files images/conversation_outgoing@27.png 1970-01-01 00:00:00 +0000 and images/conversation_outgoing@27.png 2014-10-11 18:44:23 +0000 differ7Binary files images/conversation_outgoing@27.png 1970-01-01 00:00:00 +0000 and images/conversation_outgoing@27.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/conversation_outgoing@27.sci'
--- images/conversation_outgoing@27.sci 1970-01-01 00:00:00 +0000
+++ images/conversation_outgoing@27.sci 2014-10-11 18:44:23 +0000
@@ -0,0 +1,5 @@
1border.left: 36
2border.top: 38
3border.bottom: 80
4border.right: 50
5source: conversation_outgoing@27.png
06
=== added file 'images/dialog_clock_w.png'
1Binary files images/dialog_clock_w.png 1970-01-01 00:00:00 +0000 and images/dialog_clock_w.png 2014-10-11 18:44:23 +0000 differ7Binary files images/dialog_clock_w.png 1970-01-01 00:00:00 +0000 and images/dialog_clock_w.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/dialogs_check.png'
2Binary files images/dialogs_check.png 1970-01-01 00:00:00 +0000 and images/dialogs_check.png 2014-10-11 18:44:23 +0000 differ8Binary files images/dialogs_check.png 1970-01-01 00:00:00 +0000 and images/dialogs_check.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/dialogs_halfcheck.png'
3Binary files images/dialogs_halfcheck.png 1970-01-01 00:00:00 +0000 and images/dialogs_halfcheck.png 2014-10-11 18:44:23 +0000 differ9Binary files images/dialogs_halfcheck.png 1970-01-01 00:00:00 +0000 and images/dialogs_halfcheck.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/group_aqua.png'
4Binary files images/group_aqua.png 1970-01-01 00:00:00 +0000 and images/group_aqua.png 2014-10-11 18:44:23 +0000 differ10Binary files images/group_aqua.png 1970-01-01 00:00:00 +0000 and images/group_aqua.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/group_blue.png'
5Binary files images/group_blue.png 1970-01-01 00:00:00 +0000 and images/group_blue.png 2014-10-11 18:44:23 +0000 differ11Binary files images/group_blue.png 1970-01-01 00:00:00 +0000 and images/group_blue.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/group_green.png'
6Binary files images/group_green.png 1970-01-01 00:00:00 +0000 and images/group_green.png 2014-10-11 18:44:23 +0000 differ12Binary files images/group_green.png 1970-01-01 00:00:00 +0000 and images/group_green.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/group_orange.png'
7Binary files images/group_orange.png 1970-01-01 00:00:00 +0000 and images/group_orange.png 2014-10-11 18:44:23 +0000 differ13Binary files images/group_orange.png 1970-01-01 00:00:00 +0000 and images/group_orange.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/group_pink.png'
8Binary files images/group_pink.png 1970-01-01 00:00:00 +0000 and images/group_pink.png 2014-10-11 18:44:23 +0000 differ14Binary files images/group_pink.png 1970-01-01 00:00:00 +0000 and images/group_pink.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/group_red.png'
9Binary files images/group_red.png 1970-01-01 00:00:00 +0000 and images/group_red.png 2014-10-11 18:44:23 +0000 differ15Binary files images/group_red.png 1970-01-01 00:00:00 +0000 and images/group_red.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/group_violet.png'
10Binary files images/group_violet.png 1970-01-01 00:00:00 +0000 and images/group_violet.png 2014-10-11 18:44:23 +0000 differ16Binary files images/group_violet.png 1970-01-01 00:00:00 +0000 and images/group_violet.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/group_yellow.png'
11Binary files images/group_yellow.png 1970-01-01 00:00:00 +0000 and images/group_yellow.png 2014-10-11 18:44:23 +0000 differ17Binary files images/group_yellow.png 1970-01-01 00:00:00 +0000 and images/group_yellow.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/grouplist.png'
12Binary files images/grouplist.png 1970-01-01 00:00:00 +0000 and images/grouplist.png 2014-10-11 18:44:23 +0000 differ18Binary files images/grouplist.png 1970-01-01 00:00:00 +0000 and images/grouplist.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/ic_ab_logo.png'
13Binary files images/ic_ab_logo.png 1970-01-01 00:00:00 +0000 and images/ic_ab_logo.png 2014-10-11 18:44:23 +0000 differ19Binary files images/ic_ab_logo.png 1970-01-01 00:00:00 +0000 and images/ic_ab_logo.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/ic_profile_send_message.png'
14Binary files images/ic_profile_send_message.png 1970-01-01 00:00:00 +0000 and images/ic_profile_send_message.png 2014-10-11 18:44:23 +0000 differ20Binary files images/ic_profile_send_message.png 1970-01-01 00:00:00 +0000 and images/ic_profile_send_message.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/ic_send.png'
15Binary files images/ic_send.png 1970-01-01 00:00:00 +0000 and images/ic_send.png 2014-10-11 18:44:23 +0000 differ21Binary files images/ic_send.png 1970-01-01 00:00:00 +0000 and images/ic_send.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/ic_send_disabled.png'
16Binary files images/ic_send_disabled.png 1970-01-01 00:00:00 +0000 and images/ic_send_disabled.png 2014-10-11 18:44:23 +0000 differ22Binary files images/ic_send_disabled.png 1970-01-01 00:00:00 +0000 and images/ic_send_disabled.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/intro0.png'
17Binary files images/intro0.png 1970-01-01 00:00:00 +0000 and images/intro0.png 2014-10-11 18:44:23 +0000 differ23Binary files images/intro0.png 1970-01-01 00:00:00 +0000 and images/intro0.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/intro1.png'
18Binary files images/intro1.png 1970-01-01 00:00:00 +0000 and images/intro1.png 2014-10-11 18:44:23 +0000 differ24Binary files images/intro1.png 1970-01-01 00:00:00 +0000 and images/intro1.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/intro2.png'
19Binary files images/intro2.png 1970-01-01 00:00:00 +0000 and images/intro2.png 2014-10-11 18:44:23 +0000 differ25Binary files images/intro2.png 1970-01-01 00:00:00 +0000 and images/intro2.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/intro3.png'
20Binary files images/intro3.png 1970-01-01 00:00:00 +0000 and images/intro3.png 2014-10-11 18:44:23 +0000 differ26Binary files images/intro3.png 1970-01-01 00:00:00 +0000 and images/intro3.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/intro4.png'
21Binary files images/intro4.png 1970-01-01 00:00:00 +0000 and images/intro4.png 2014-10-11 18:44:23 +0000 differ27Binary files images/intro4.png 1970-01-01 00:00:00 +0000 and images/intro4.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/intro5.png'
22Binary files images/intro5.png 1970-01-01 00:00:00 +0000 and images/intro5.png 2014-10-11 18:44:23 +0000 differ28Binary files images/intro5.png 1970-01-01 00:00:00 +0000 and images/intro5.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/intro6.png'
23Binary files images/intro6.png 1970-01-01 00:00:00 +0000 and images/intro6.png 2014-10-11 18:44:23 +0000 differ29Binary files images/intro6.png 1970-01-01 00:00:00 +0000 and images/intro6.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/telegram.png'
24Binary files images/telegram.png 1970-01-01 00:00:00 +0000 and images/telegram.png 2014-10-11 18:44:23 +0000 differ30Binary files images/telegram.png 1970-01-01 00:00:00 +0000 and images/telegram.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/telegram.svg'
--- images/telegram.svg 1970-01-01 00:00:00 +0000
+++ images/telegram.svg 2014-10-11 18:44:23 +0000
@@ -0,0 +1,198 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:xlink="http://www.w3.org/1999/xlink"
11 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13 id="svg2"
14 version="1.1"
15 inkscape:version="0.48.4 r9939"
16 width="240"
17 height="240"
18 sodipodi:docname="telegram.svg">
19 <metadata
20 id="metadata8">
21 <rdf:RDF>
22 <cc:Work
23 rdf:about="">
24 <dc:format>image/svg+xml</dc:format>
25 <dc:type
26 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
27 <dc:title />
28 </cc:Work>
29 </rdf:RDF>
30 </metadata>
31 <defs
32 id="defs6">
33 <linearGradient
34 id="linearGradient3877">
35 <stop
36 style="stop-color:#eff7fc;stop-opacity:1;"
37 offset="0"
38 id="stop3879" />
39 <stop
40 style="stop-color:#ffffff;stop-opacity:1;"
41 offset="1"
42 id="stop3881" />
43 </linearGradient>
44 <linearGradient
45 id="linearGradient3829">
46 <stop
47 id="stop3831"
48 offset="0"
49 style="stop-color:#1f96d4;stop-opacity:1;" />
50 <stop
51 id="stop3833"
52 offset="1"
53 style="stop-color:#37aee2;stop-opacity:1;" />
54 </linearGradient>
55 <linearGradient
56 id="linearGradient3821">
57 <stop
58 style="stop-color:#37aee2;stop-opacity:1;"
59 offset="0"
60 id="stop3823" />
61 <stop
62 style="stop-color:#1e96c8;stop-opacity:1;"
63 offset="1"
64 id="stop3825" />
65 </linearGradient>
66 <linearGradient
67 id="linearGradient3783">
68 <stop
69 style="stop-color:#1e94d3;stop-opacity:1;"
70 offset="0"
71 id="stop3785" />
72 <stop
73 id="stop3803"
74 offset="1"
75 style="stop-color:#1e94d3;stop-opacity:1;" />
76 </linearGradient>
77 <linearGradient
78 inkscape:collect="always"
79 xlink:href="#linearGradient3783"
80 id="linearGradient3827"
81 x1="-10"
82 y1="90"
83 x2="30"
84 y2="50"
85 gradientUnits="userSpaceOnUse" />
86 <linearGradient
87 inkscape:collect="always"
88 xlink:href="#linearGradient3783-1"
89 id="linearGradient3827-7"
90 x1="-10"
91 y1="90"
92 x2="30"
93 y2="50"
94 gradientUnits="userSpaceOnUse" />
95 <linearGradient
96 id="linearGradient3783-1">
97 <stop
98 style="stop-color:#1e94d3;stop-opacity:1;"
99 offset="0"
100 id="stop3785-2" />
101 <stop
102 id="stop3803-6"
103 offset="1"
104 style="stop-color:#1e94d3;stop-opacity:1;" />
105 </linearGradient>
106 <linearGradient
107 inkscape:collect="always"
108 xlink:href="#linearGradient3821"
109 id="linearGradient3873"
110 x1="16.5"
111 y1="56.333336"
112 x2="6.6666665"
113 y2="80"
114 gradientUnits="userSpaceOnUse" />
115 <linearGradient
116 inkscape:collect="always"
117 xlink:href="#linearGradient3877"
118 id="linearGradient3883"
119 x1="135"
120 y1="120"
121 x2="160"
122 y2="160"
123 gradientUnits="userSpaceOnUse" />
124 <linearGradient
125 inkscape:collect="always"
126 xlink:href="#linearGradient3821"
127 id="linearGradient3784"
128 x1="135.63235"
129 y1="23.727272"
130 x2="84.762161"
131 y2="98.296661"
132 gradientUnits="userSpaceOnUse"
133 gradientTransform="matrix(1.1616826,0,0,1.8835888,1.6670629,-2.6299072)" />
134 <linearGradient
135 inkscape:collect="always"
136 xlink:href="#linearGradient3821"
137 id="linearGradient3816"
138 gradientUnits="userSpaceOnUse"
139 gradientTransform="matrix(1.2526644,0,0,2.0706894,-9.6396796,-12.768958)"
140 x1="135.63235"
141 y1="23.727272"
142 x2="84.762161"
143 y2="98.296661" />
144 </defs>
145 <sodipodi:namedview
146 pagecolor="#ffffff"
147 bordercolor="#666666"
148 borderopacity="1"
149 objecttolerance="10"
150 gridtolerance="10"
151 guidetolerance="10"
152 inkscape:pageopacity="0"
153 inkscape:pageshadow="2"
154 inkscape:window-width="2505"
155 inkscape:window-height="1056"
156 id="namedview4"
157 showgrid="false"
158 inkscape:zoom="1.4142136"
159 inkscape:cx="347.12744"
160 inkscape:cy="20.202031"
161 inkscape:window-x="55"
162 inkscape:window-y="1033"
163 inkscape:window-maximized="1"
164 inkscape:current-layer="svg2">
165 <inkscape:grid
166 type="xygrid"
167 id="grid2987"
168 empspacing="5"
169 visible="true"
170 enabled="true"
171 snapvisiblegridlinesonly="true" />
172 </sodipodi:namedview>
173 <rect
174 style="fill:url(#linearGradient3816);fill-opacity:1"
175 id="rect3775"
176 width="240"
177 height="240"
178 x="-1.2397766e-05"
179 y="1.4305115e-06" />
180 <path
181 style="fill:#c8daea;fill-opacity:1;stroke:none"
182 d="m 98,175 c -3.887644,0 -3.226996,-1.46793 -4.567796,-5.16949 l -11.440678,-37.62712 70.805084,-44.237289 8.26271,2.161017 -6.8644,18.813562 z"
183 id="path2993"
184 inkscape:connector-curvature="0"
185 sodipodi:nodetypes="ccccccc" />
186 <path
187 style="fill:#a9c9dd;fill-opacity:1;stroke:none"
188 d="m 98,175 c 3,0 4.32989,-1.36747 6,-3 2.57835,-2.52034 36,-35 36,-35 l -20.47193,-4.95511 -19,12 L 98,174 z"
189 id="path2989"
190 inkscape:connector-curvature="0"
191 sodipodi:nodetypes="csccccc" />
192 <path
193 style="fill:url(#linearGradient3883);stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
194 d="m 100.04237,144.40678 48.36017,35.72884 c 5.51851,3.04487 9.5014,1.46836 10.87626,-5.12353 l 19.68513,-92.762819 c 2.01542,-8.080226 -3.08008,-11.745195 -8.35944,-9.348192 L 55.010511,117.48476 c -7.890082,3.1647 -7.844107,7.56662 -1.438184,9.52797 l 29.662531,9.2583 68.673252,-43.325271 c 3.24187,-1.965881 6.21727,-0.908988 3.77523,1.25841 z"
195 id="path2991"
196 inkscape:connector-curvature="0"
197 sodipodi:nodetypes="ccccccccccc" />
198</svg>
0199
=== added file 'images/telegram_symbolic.svg'
--- images/telegram_symbolic.svg 1970-01-01 00:00:00 +0000
+++ images/telegram_symbolic.svg 2014-10-11 18:44:23 +0000
@@ -0,0 +1,192 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3
4<svg
5 xmlns:dc="http://purl.org/dc/elements/1.1/"
6 xmlns:cc="http://creativecommons.org/ns#"
7 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
8 xmlns:svg="http://www.w3.org/2000/svg"
9 xmlns="http://www.w3.org/2000/svg"
10 xmlns:xlink="http://www.w3.org/1999/xlink"
11 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
12 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13 id="svg2"
14 version="1.1"
15 inkscape:version="0.48.5 r10040"
16 width="240"
17 height="240"
18 sodipodi:docname="telegram_symbolic.svg">
19 <metadata
20 id="metadata8">
21 <rdf:RDF>
22 <cc:Work
23 rdf:about="">
24 <dc:format>image/svg+xml</dc:format>
25 <dc:type
26 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
27 <dc:title />
28 </cc:Work>
29 </rdf:RDF>
30 </metadata>
31 <defs
32 id="defs6">
33 <linearGradient
34 id="linearGradient3877">
35 <stop
36 style="stop-color:#eff7fc;stop-opacity:1;"
37 offset="0"
38 id="stop3879" />
39 <stop
40 style="stop-color:#ffffff;stop-opacity:1;"
41 offset="1"
42 id="stop3881" />
43 </linearGradient>
44 <linearGradient
45 id="linearGradient3829">
46 <stop
47 id="stop3831"
48 offset="0"
49 style="stop-color:#1f96d4;stop-opacity:1;" />
50 <stop
51 id="stop3833"
52 offset="1"
53 style="stop-color:#37aee2;stop-opacity:1;" />
54 </linearGradient>
55 <linearGradient
56 id="linearGradient3821">
57 <stop
58 style="stop-color:#37aee2;stop-opacity:1;"
59 offset="0"
60 id="stop3823" />
61 <stop
62 style="stop-color:#1e96c8;stop-opacity:1;"
63 offset="1"
64 id="stop3825" />
65 </linearGradient>
66 <linearGradient
67 id="linearGradient3783">
68 <stop
69 style="stop-color:#1e94d3;stop-opacity:1;"
70 offset="0"
71 id="stop3785" />
72 <stop
73 id="stop3803"
74 offset="1"
75 style="stop-color:#1e94d3;stop-opacity:1;" />
76 </linearGradient>
77 <linearGradient
78 inkscape:collect="always"
79 xlink:href="#linearGradient3783"
80 id="linearGradient3827"
81 x1="-10"
82 y1="90"
83 x2="30"
84 y2="50"
85 gradientUnits="userSpaceOnUse" />
86 <linearGradient
87 inkscape:collect="always"
88 xlink:href="#linearGradient3783-1"
89 id="linearGradient3827-7"
90 x1="-10"
91 y1="90"
92 x2="30"
93 y2="50"
94 gradientUnits="userSpaceOnUse" />
95 <linearGradient
96 id="linearGradient3783-1">
97 <stop
98 style="stop-color:#1e94d3;stop-opacity:1;"
99 offset="0"
100 id="stop3785-2" />
101 <stop
102 id="stop3803-6"
103 offset="1"
104 style="stop-color:#1e94d3;stop-opacity:1;" />
105 </linearGradient>
106 <linearGradient
107 inkscape:collect="always"
108 xlink:href="#linearGradient3821"
109 id="linearGradient3873"
110 x1="16.5"
111 y1="56.333336"
112 x2="6.6666665"
113 y2="80"
114 gradientUnits="userSpaceOnUse" />
115 <linearGradient
116 inkscape:collect="always"
117 xlink:href="#linearGradient3877"
118 id="linearGradient3883"
119 x1="135"
120 y1="120"
121 x2="160"
122 y2="160"
123 gradientUnits="userSpaceOnUse"
124 gradientTransform="matrix(1.8182052,0,0,2.1564431,-86.693748,-153.47211)" />
125 <linearGradient
126 inkscape:collect="always"
127 xlink:href="#linearGradient3821"
128 id="linearGradient3784"
129 x1="135.63235"
130 y1="23.727272"
131 x2="84.762161"
132 y2="98.296661"
133 gradientUnits="userSpaceOnUse"
134 gradientTransform="matrix(1.1616826,0,0,1.8835888,1.6670629,-2.6299072)" />
135 <linearGradient
136 inkscape:collect="always"
137 xlink:href="#linearGradient3821"
138 id="linearGradient3816"
139 gradientUnits="userSpaceOnUse"
140 gradientTransform="matrix(1.2526644,0,0,2.0706894,-9.6396796,-12.768958)"
141 x1="135.63235"
142 y1="23.727272"
143 x2="84.762161"
144 y2="98.296661" />
145 </defs>
146 <sodipodi:namedview
147 pagecolor="#ffffff"
148 bordercolor="#666666"
149 borderopacity="1"
150 objecttolerance="10"
151 gridtolerance="10"
152 guidetolerance="10"
153 inkscape:pageopacity="0"
154 inkscape:pageshadow="2"
155 inkscape:window-width="1920"
156 inkscape:window-height="1056"
157 id="namedview4"
158 showgrid="false"
159 inkscape:zoom="1.4142136"
160 inkscape:cx="347.12744"
161 inkscape:cy="20.202031"
162 inkscape:window-x="0"
163 inkscape:window-y="24"
164 inkscape:window-maximized="1"
165 inkscape:current-layer="svg2">
166 <inkscape:grid
167 type="xygrid"
168 id="grid2987"
169 empspacing="5"
170 visible="true"
171 enabled="true"
172 snapvisiblegridlinesonly="true" />
173 </sodipodi:namedview>
174 <path
175 style="fill:#c8daea;fill-opacity:1;stroke:none"
176 d="m 91.490364,223.90544 c -7.068542,0 -5.867348,-3.1655 -8.3052,-11.14771 L 62.383669,131.61698 191.12184,36.221787 l 15.0233,4.66011 -12.48089,40.570376 z"
177 id="path2993"
178 inkscape:connector-curvature="0"
179 sodipodi:nodetypes="ccccccc" />
180 <path
181 style="fill:#a9c9dd;fill-opacity:1;stroke:none"
182 d="m 91.490364,223.90544 c 5.454604,0 7.872619,-2.94887 10.909226,-6.46934 4.68796,-5.43497 65.45539,-75.4755 65.45539,-75.4755 l -37.22217,-10.68541 -34.545901,25.87731 -4.596545,64.59649 z"
183 id="path2989"
184 inkscape:connector-curvature="0"
185 sodipodi:nodetypes="csccccc" />
186 <path
187 style="fill:url(#linearGradient3883);fill-opacity:1;stroke:none"
188 d="m 95.203812,157.93289 87.928708,77.04721 c 10.03378,6.56609 17.27549,3.16644 19.77527,-11.04859 L 238.6994,23.893767 C 242.36384,6.4692194 233.09918,-1.434078 223.50022,3.7349231 L 13.326647,99.877089 C -1.0191403,106.70159 -0.93554896,116.19407 10.711735,120.42362 L 64.644301,140.38861 189.50637,46.960141 c 5.89438,-4.239313 11.30427,-1.960188 6.86414,2.713683 z"
189 id="path2991"
190 inkscape:connector-curvature="0"
191 sodipodi:nodetypes="ccccccccccc" />
192</svg>
0193
=== added file 'images/user_aqua.png'
1Binary files images/user_aqua.png 1970-01-01 00:00:00 +0000 and images/user_aqua.png 2014-10-11 18:44:23 +0000 differ194Binary files images/user_aqua.png 1970-01-01 00:00:00 +0000 and images/user_aqua.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/user_blue.png'
2Binary files images/user_blue.png 1970-01-01 00:00:00 +0000 and images/user_blue.png 2014-10-11 18:44:23 +0000 differ195Binary files images/user_blue.png 1970-01-01 00:00:00 +0000 and images/user_blue.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/user_green.png'
3Binary files images/user_green.png 1970-01-01 00:00:00 +0000 and images/user_green.png 2014-10-11 18:44:23 +0000 differ196Binary files images/user_green.png 1970-01-01 00:00:00 +0000 and images/user_green.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/user_orange.png'
4Binary files images/user_orange.png 1970-01-01 00:00:00 +0000 and images/user_orange.png 2014-10-11 18:44:23 +0000 differ197Binary files images/user_orange.png 1970-01-01 00:00:00 +0000 and images/user_orange.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/user_pink.png'
5Binary files images/user_pink.png 1970-01-01 00:00:00 +0000 and images/user_pink.png 2014-10-11 18:44:23 +0000 differ198Binary files images/user_pink.png 1970-01-01 00:00:00 +0000 and images/user_pink.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/user_placeholder.png'
6Binary files images/user_placeholder.png 1970-01-01 00:00:00 +0000 and images/user_placeholder.png 2014-10-11 18:44:23 +0000 differ199Binary files images/user_placeholder.png 1970-01-01 00:00:00 +0000 and images/user_placeholder.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/user_red.png'
7Binary files images/user_red.png 1970-01-01 00:00:00 +0000 and images/user_red.png 2014-10-11 18:44:23 +0000 differ200Binary files images/user_red.png 1970-01-01 00:00:00 +0000 and images/user_red.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/user_violet.png'
8Binary files images/user_violet.png 1970-01-01 00:00:00 +0000 and images/user_violet.png 2014-10-11 18:44:23 +0000 differ201Binary files images/user_violet.png 1970-01-01 00:00:00 +0000 and images/user_violet.png 2014-10-11 18:44:23 +0000 differ
=== added file 'images/user_yellow.png'
9Binary files images/user_yellow.png 1970-01-01 00:00:00 +0000 and images/user_yellow.png 2014-10-11 18:44:23 +0000 differ202Binary files images/user_yellow.png 1970-01-01 00:00:00 +0000 and images/user_yellow.png 2014-10-11 18:44:23 +0000 differ
=== added directory 'js'
=== added file 'js/avatar.js'
--- js/avatar.js 1970-01-01 00:00:00 +0000
+++ js/avatar.js 2014-10-11 18:44:23 +0000
@@ -0,0 +1,21 @@
1.pragma library
2
3var AVATARS = [
4 ["#8179d7", "user_violet.png"],
5 ["#f2749a", "user_pink.png" ],
6 ["#7ec455", "user_green.png" ],
7 ["#f3c34a", "user_yellow.png"],
8 ["#5b9dd8", "user_blue.png" ],
9 ["#62b8cd", "user_aqua.png" ],
10 ["#ed8b4a", "user_orange.png"],
11 ["#d95848", "user_red.png" ]
12]
13
14function getColor(userId) {
15 return AVATARS[userId % 8][0];
16}
17
18function getAvatar(userId) {
19 return AVATARS[userId % 8][1];
20}
21
022
=== added file 'js/ba-linkify.js'
--- js/ba-linkify.js 1970-01-01 00:00:00 +0000
+++ js/ba-linkify.js 2014-10-11 18:44:23 +0000
@@ -0,0 +1,211 @@
1/*!
2 * JavaScript Linkify - v0.3 - 6/27/2009
3 * http://benalman.com/projects/javascript-linkify/
4 *
5 * Copyright (c) 2009 "Cowboy" Ben Alman
6 * Dual licensed under the MIT and GPL licenses.
7 * http://benalman.com/about/license/
8 *
9 * Some regexps adapted from http://userscripts.org/scripts/review/7122
10 */
11
12// Script: JavaScript Linkify: Process links in text!
13//
14// *Version: 0.3, Last updated: 6/27/2009*
15//
16// Project Home - http://benalman.com/projects/javascript-linkify/
17// GitHub - http://github.com/cowboy/javascript-linkify/
18// Source - http://github.com/cowboy/javascript-linkify/raw/master/ba-linkify.js
19// (Minified) - http://github.com/cowboy/javascript-linkify/raw/master/ba-linkify.min.js (2.8kb)
20//
21// About: License
22//
23// Copyright (c) 2009 "Cowboy" Ben Alman,
24// Dual licensed under the MIT and GPL licenses.
25// http://benalman.com/about/license/
26//
27// About: Examples
28//
29// This working example, complete with fully commented code, illustrates one way
30// in which this code can be used.
31//
32// Linkify - http://benalman.com/code/projects/javascript-linkify/examples/linkify/
33//
34// About: Support and Testing
35//
36// Information about what browsers this code has been tested in.
37//
38// Browsers Tested - Internet Explorer 6-8, Firefox 2-3.7, Safari 3-4, Chrome, Opera 9.6-10.
39//
40// About: Release History
41//
42// 0.3 - (6/27/2009) Initial release
43
44// Function: linkify
45//
46// Turn text into linkified html.
47//
48// Usage:
49//
50// > var html = linkify( text [, options ] );
51//
52// Arguments:
53//
54// text - (String) Non-HTML text containing links to be parsed.
55// options - (Object) An optional object containing linkify parse options.
56//
57// Options:
58//
59// callback (Function) - If specified, this will be called once for each link-
60// or non-link-chunk with two arguments, text and href. If the chunk is
61// non-link, href will be omitted. If unspecified, the default linkification
62// callback is used.
63// punct_regexp (RegExp) - A RegExp that will be used to trim trailing
64// punctuation from links, instead of the default. If set to null, trailing
65// punctuation will not be trimmed.
66//
67// Returns:
68//
69// (String) An HTML string containing links.
70
71var SCHEME = "[a-z\\d.-]+://",
72IPV4 = "(?:(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])\\.){3}(?:[0-9]|[1-9]\\d|1\\d{2}|2[0-4]\\d|25[0-5])",
73HOSTNAME = "(?:(?:[^\\s!@#$%^&*()_=+[\\]{}\\\\|;:'\",.<>/?]+)\\.)+",
74TLD = "(?:ac|ad|aero|ae|af|ag|ai|al|am|an|ao|aq|arpa|ar|asia|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|biz|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|cat|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|coop|com|co|cr|cu|cv|cx|cy|cz|de|dj|dk|dm|do|dz|ec|edu|ee|eg|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gov|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|info|int|in|io|iq|ir|is|it|je|jm|jobs|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mil|mk|ml|mm|mn|mobi|mo|mp|mq|mr|ms|mt|museum|mu|mv|mw|mx|my|mz|name|na|nc|net|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|org|pa|pe|pf|pg|ph|pk|pl|pm|pn|pro|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|sj|sk|sl|sm|sn|so|sr|st|su|sv|sy|sz|tc|td|tel|tf|tg|th|tj|tk|tl|tm|tn|to|tp|travel|tr|tt|tv|tw|tz|ua|ug|uk|um|us|uy|uz|va|vc|ve|vg|vi|vn|vu|wf|ws|xn--0zwm56d|xn--11b5bs3a9aj6g|xn--80akhbyknj4f|xn--9t4b11yi5a|xn--deba0ad|xn--g6w251d|xn--hgbk6aj7f53bba|xn--hlcj6aya9esc7a|xn--jxalpdlp|xn--kgbechtv|xn--zckzah|ye|yt|yu|za|zm|zw)",
75HOST_OR_IP = "(?:" + HOSTNAME + TLD + "|" + IPV4 + ")",
76PATH = "(?:[;/][^#?<>\\s]*)?",
77QUERY_FRAG = "(?:\\?[^#<>\\s]*)?(?:#[^<>\\s]*)?",
78URI1 = "\\b" + SCHEME + "[^<>\\s]+",
79URI2 = "\\b" + HOST_OR_IP + PATH + QUERY_FRAG + "(?!\\w)",
80
81MAILTO = "mailto:",
82EMAIL = "(?:" + MAILTO + ")?[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@" + HOST_OR_IP + QUERY_FRAG + "(?!\\w)",
83
84URI_RE = new RegExp( "(?:" + URI1 + "|" + URI2 + "|" + EMAIL + ")", "ig" ),
85SCHEME_RE = new RegExp( "^" + SCHEME, "i" ),
86
87quotes = {
88 "'": "`",
89 '>': '<',
90 ')': '(',
91 ']': '[',
92 '}': '{',
93 '»': '«',
94 '›': '‹'
95},
96
97default_options = {
98 callback: function( text, href ) {
99 return href ? '<a href="' + href + '" title="' + href + '">' + text + '</a>' : text;
100 },
101 punct_regexp: /(?:[!?.,:;'"]|(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)$/
102};
103
104function linkify( txt, options ) {
105 options = options || {};
106
107 // Temp variables.
108 var arr,
109 i,
110 link,
111 href,
112
113 // Output HTML.
114 html = '',
115
116 // Store text / link parts, in order, for re-combination.
117 parts = [],
118
119 // Used for keeping track of indices in the text.
120 idx_prev,
121 idx_last,
122 idx,
123 link_last,
124
125 // Used for trimming trailing punctuation and quotes from links.
126 matches_begin,
127 matches_end,
128 quote_begin,
129 quote_end;
130
131 // Initialize options.
132 for ( i in default_options ) {
133 if ( options[ i ] === undefined ) {
134 options[ i ] = default_options[ i ];
135 }
136 }
137
138 // Find links.
139 while ( arr = URI_RE.exec( txt ) ) {
140
141 link = arr[0];
142 idx_last = URI_RE.lastIndex;
143 idx = idx_last - link.length;
144
145 // Not a link if preceded by certain characters.
146 if ( /[\/:]/.test( txt.charAt( idx - 1 ) ) ) {
147 continue;
148 }
149
150 // Trim trailing punctuation.
151 do {
152 // If no changes are made, we don't want to loop forever!
153 link_last = link;
154
155 quote_end = link.substr( -1 )
156 quote_begin = quotes[ quote_end ];
157
158 // Ending quote character?
159 if ( quote_begin ) {
160 matches_begin = link.match( new RegExp( '\\' + quote_begin + '(?!$)', 'g' ) );
161 matches_end = link.match( new RegExp( '\\' + quote_end, 'g' ) );
162
163 // If quotes are unbalanced, remove trailing quote character.
164 if ( ( matches_begin ? matches_begin.length : 0 ) < ( matches_end ? matches_end.length : 0 ) ) {
165 link = link.substr( 0, link.length - 1 );
166 idx_last--;
167 }
168 }
169
170 // Ending non-quote punctuation character?
171 if ( options.punct_regexp ) {
172 link = link.replace( options.punct_regexp, function(a){
173 idx_last -= a.length;
174 return '';
175 });
176 }
177 } while ( link.length && link !== link_last );
178
179 href = link;
180
181 // Add appropriate protocol to naked links.
182 if ( !SCHEME_RE.test( href ) ) {
183 href = ( href.indexOf( '@' ) !== -1 ? ( !href.indexOf( MAILTO ) ? '' : MAILTO )
184 : !href.indexOf( 'irc.' ) ? 'irc://'
185 : !href.indexOf( 'ftp.' ) ? 'ftp://'
186 : 'http://' )
187 + href;
188 }
189
190 // Push preceding non-link text onto the array.
191 if ( idx_prev != idx ) {
192 parts.push([ txt.slice( idx_prev, idx ) ]);
193 idx_prev = idx_last;
194 }
195
196 // Push massaged link onto the array
197 parts.push([ link, href ]);
198 };
199
200 // Push remaining non-link text onto the array.
201 parts.push([ txt.substr( idx_prev ) ]);
202
203 // Process the array items.
204 for ( i = 0; i < parts.length; i++ ) {
205 html += options.callback.apply( this, parts[i] );
206 }
207
208 // In case of catastrophic failure, return the original text;
209 return html || txt;
210};
211
0212
=== added file 'js/time.js'
--- js/time.js 1970-01-01 00:00:00 +0000
+++ js/time.js 2014-10-11 18:44:23 +0000
@@ -0,0 +1,44 @@
1.pragma library
2
3var MILLIS_IN_DAY = 1000 * 60 * 60 * 24;
4var MILLIS_IN_WEEK = 7 * MILLIS_IN_DAY;
5
6function format(time) {
7 var date = new Date(time);
8 var today = new Date();
9
10 var isToday = date.getDate() === today.getDate();
11 if (isToday) {
12 return Qt.formatTime(date, "hh:mm");
13 } else {
14 var oneWeekAgo = new Date(today.getTime() - MILLIS_IN_WEEK);
15 var isLessThanWeek =
16 date.getTime() > oneWeekAgo.getTime() &&
17 date.getDate() !== oneWeekAgo.getDate();
18 if (isLessThanWeek) {
19 return Qt.formatDate(date, "ddd");
20 }
21 }
22 return Qt.formatDate(date, "MMM d");
23}
24
25function formatLastSeen(time) {
26 var date = new Date(time);
27 var today = new Date();
28 var yesterday = new Date(today - MILLIS_IN_DAY);
29
30 var isToday = date.getDate() === today.getDate();
31 if (isToday) {
32 return "today at " + Qt.formatTime(date, "hh:mm");
33 } else if (date.getDate() === yesterday.getDate()) {
34 return "yesterday at " + Qt.formatTime(date, "hh:mm");
35 } else {
36 return Qt.formatDate(date, "MMM d") + " at " + Qt.formatTime(date, "hh:mm");
37 }
38}
39
40function formatTimeOnly(time) {
41 var date = new Date(time);
42
43 return Qt.formatTime(date, "hh:mm");
44}
045
=== added file 'manifest.json.in'
--- manifest.json.in 1970-01-01 00:00:00 +0000
+++ manifest.json.in 2014-10-11 18:44:23 +0000
@@ -0,0 +1,20 @@
1{
2 "name": "@APP_PACKAGE@",
3 "version": "@APP_VERSION@",
4 "description": "Telegram for Ubuntu",
5 "framework": "@FRAMEWORK@",
6 "architecture": "@ARCHITECTURE@",
7 "title": "@APP_TITLE@",
8 "hooks": {
9 "telegram": {
10 "apparmor": "apparmor-telegram.json",
11 "desktop": "telegram.desktop"
12 },
13 "push": {
14 "apparmor": "apparmor-push.json",
15 "push-helper": "push.json"
16 }
17 },
18 "icon": "@APP_ICON@",
19 "maintainer": "Ubuntu Telegram team <libqtelegram-team@lists.launchpad.net>"
20}
021
=== added directory 'po'
=== added file 'po/CMakeLists.txt'
--- po/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ po/CMakeLists.txt 2014-10-11 18:44:23 +0000
@@ -0,0 +1,29 @@
1include(FindGettext)
2find_program(GETTEXT_XGETTEXT_EXECUTABLE xgettext)
3
4set(DOMAIN ${PROJECT_NAME})
5set(POT_FILE ${DOMAIN}.pot)
6file(GLOB PO_FILES *.po)
7
8add_custom_target(${POT_FILE} ALL
9 COMMENT "Generating translation template"
10 COMMAND ${INTLTOOL_EXTRACT} --update --type=gettext/ini
11 --srcdir=${CMAKE_SOURCE_DIR} ${DESKTOP_FILE}.in.in
12 COMMAND ${GETTEXT_XGETTEXT_EXECUTABLE} -o ${POT_FILE}
13 --from-code=UTF-8
14 --c++ --qt --add-comments=TRANSLATORS
15 --keyword=tr --keyword=tr:1,2 --keyword=N_
16 --package-name='${PROJECT}'
17 --copyright-holder='Canonical Ltd.'
18 -D ${CMAKE_CURRENT_SOURCE_DIR} ${I18N_SRC_FILES}
19 -D ${CMAKE_CURRENT_BINARY_DIR} ${DESKTOP_FILE}.in.in.h
20 COMMAND ${CMAKE_COMMAND} -E copy ${POT_FILE} ${CMAKE_CURRENT_SOURCE_DIR})
21
22foreach(PO_FILE ${PO_FILES})
23 get_filename_component(LANG ${PO_FILE} NAME_WE)
24 gettext_process_po_files(${LANG} ALL PO_FILES ${PO_FILE})
25 set(INSTALL_DIR ${CMAKE_INSTALL_LOCALEDIR}/${LANG}/LC_MESSAGES)
26 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${LANG}.gmo
27 DESTINATION ${INSTALL_DIR}
28 RENAME ${DOMAIN}.mo)
29endforeach(PO_FILE)
030
=== added file 'po/ca.po'
--- po/ca.po 1970-01-01 00:00:00 +0000
+++ po/ca.po 2014-10-11 18:44:23 +0000
@@ -0,0 +1,403 @@
1# Catalan translation for libqtelegram
2# Copyright (c) 2014 Rosetta Contributors and Canonical Ltd 2014
3# This file is distributed under the same license as the libqtelegram package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, 2014.
5#
6msgid ""
7msgstr ""
8"Project-Id-Version: libqtelegram\n"
9"Report-Msgid-Bugs-To: FULL NAME <EMAIL@ADDRESS>\n"
10"POT-Creation-Date: 2014-10-07 12:34+0200\n"
11"PO-Revision-Date: 2014-10-01 06:18+0000\n"
12"Last-Translator: David Planella <david.planella@ubuntu.com>\n"
13"Language-Team: Catalan <ca@li.org>\n"
14"MIME-Version: 1.0\n"
15"Content-Type: text/plain; charset=UTF-8\n"
16"Content-Transfer-Encoding: 8bit\n"
17"X-Launchpad-Export-Date: 2014-10-08 08:27+0000\n"
18"X-Generator: Launchpad (build 17196)\n"
19
20#: ../components/TelegramContactsListItem.qml:61
21msgid "Contact"
22msgstr "Contacte"
23
24#: ../components/TelegramContactsListItem.qml:77
25msgid "Last seen"
26msgstr "Vist per darrera vegada"
27
28#: ../components/TelegramContactsListItem.qml:86 ../ui/AddContactPage.qml:219
29#: ../ui/ProfilePage.qml:29
30msgid "online"
31msgstr "en línia"
32
33#. TRANSLATORS: the argument refers to a time
34#: ../components/TelegramContactsListItem.qml:89 ../ui/AddContactPage.qml:222
35#: ../ui/ProfilePage.qml:32
36#, qt-format
37msgid "last seen %1"
38msgstr "vist a les %1"
39
40#: ../components/TelegramHeader.qml:60
41msgid "Connecting..."
42msgstr "S'està connectant..."
43
44#: ../components/TelegramHeader.qml:60 ../ui/ContactsPage.qml:272
45#: ../ui/SettingsPage.qml:50 ../ui/SettingsPage.qml:100
46#: telegram.desktop.in.in.h:1
47msgid "Telegram"
48msgstr "Telegram"
49
50#: ../components/TgButton.qml:9
51msgid "Next"
52msgstr ""
53
54#: ../library/uitest/ui/DialogDesignPage.qml:146
55msgid "Enter local path to send"
56msgstr "Introduïu el camí local per enviar"
57
58#: ../library/uitest/ui/DialogDesignPage.qml:153
59msgid "Enter msg to send"
60msgstr "Escriviu el missatge per enviar"
61
62#: ../library/uitest/ui/SignInPageDesign.qml:44
63msgid ""
64"Please enter your full phone \n"
65"number with country code"
66msgstr ""
67"Intoduïu el vostre número de telèfon\n"
68"complet amb el codi de país"
69
70#: ../library/uitest/ui/SignInPageDesign.qml:66
71msgid "with '+' sign"
72msgstr "amb el signe «»"
73
74#: ../library/uitest/ui/SignUpPageDesign.qml:44
75msgid ""
76"You are not registered yet.\n"
77"Please provide registration data"
78msgstr ""
79"Encara no esteu registrat.\n"
80"Heu d'introduir les dades de registre"
81
82#: ../library/uitest/ui/SignUpPageDesign.qml:66
83msgid "first name"
84msgstr "Nom"
85
86#: ../library/uitest/ui/SignUpPageDesign.qml:78
87msgid "last name"
88msgstr "Cognom"
89
90#: ../library/uitest/ui/VerificationCodePageDesign.qml:43
91msgid ""
92"We have sent you a code via SMS.\n"
93"Please enter it below\n"
94msgstr ""
95"Us hem enviat un codi a través d'un missatge de text.\n"
96"Introduïu-lo aquí sota\n"
97
98#: ../library/uitest/ui/VerificationCodePageDesign.qml:73
99msgid "Enter your code"
100msgstr "Introduïu el codi"
101
102#: ../library/uitest/uitest.qml:112 ../library/uitest/uitest.qml:120
103msgid "The code you have entered is not valid. Try again"
104msgstr "Heu introduït un codi que no és vàlid. Torneu-ho a provar"
105
106#: ../library/uitest/uitest.qml:140
107msgid "calling user's mobile"
108msgstr "s'està trucant al mòbil de l'usuari"
109
110#: ../telegram.qml:330
111msgid "Push notifications"
112msgstr "Notificacions"
113
114#: ../telegram.qml:331
115msgid "To enable push, sign in to your Ubuntu One account."
116msgstr ""
117"Heu d'entrar al compte de l'Ubuntu One per habilitar les notificacions"
118
119#: ../telegram.qml:333
120msgid "Sign in to Ubuntu One"
121msgstr "Entra a l'Ubuntu One"
122
123#: ../telegram.qml:342
124msgid "Remind me later"
125msgstr "Recorda-m'ho més endavant"
126
127#: ../telegram.qml:350
128msgid "Don't use push"
129msgstr "No utilitzis notificacions"
130
131#: ../ui/AddContactPage.qml:26 ../ui/ContactsPage.qml:242
132msgid "Add Contact"
133msgstr "Afegeix un contacte"
134
135#: ../ui/AddContactPage.qml:31 ../ui/SignInPage.qml:118
136msgid "Done"
137msgstr "Fet"
138
139#: ../ui/AddContactPage.qml:36 ../ui/ContactsPage.qml:260
140#: ../ui/ContactsPage.qml:298 ../ui/SettingsPage.qml:62
141#: ../ui/SettingsPage.qml:114
142msgid "Cancel"
143msgstr "Cancel·la"
144
145#: ../ui/AddContactPage.qml:84
146msgid "+1 1234 56789"
147msgstr "+1 1234 56789"
148
149#: ../ui/AddContactPage.qml:102
150msgid "last seen yesterday at 19:16"
151msgstr "vist per darrera vegada ahir a les 19:16"
152
153#: ../ui/AddContactPage.qml:122
154msgid "Phone number (required)"
155msgstr "Número de telèfon (requerit)"
156
157#: ../ui/AddContactPage.qml:139 ../ui/SignUpPage.qml:50
158msgid "First name (required)"
159msgstr "Nom (requerit)"
160
161#: ../ui/AddContactPage.qml:155 ../ui/SignUpPage.qml:63
162msgid "Last name (optional)"
163msgstr "Cognoms (opcionals)"
164
165#: ../ui/AddContactPage.qml:195
166msgid "Could not add contact"
167msgstr "No s'ha pogut afegir el contacte"
168
169#: ../ui/ContactsPage.qml:26 ../ui/ContactsPage.qml:33
170#: ../ui/DialogsPage.qml:19
171msgid "Search"
172msgstr "Cerca"
173
174#: ../ui/ContactsPage.qml:38
175msgid "Add"
176msgstr "Afegeix"
177
178#: ../ui/ContactsPage.qml:46
179msgid "Ok"
180msgstr "D'acord"
181
182#: ../ui/ContactsPage.qml:55
183msgid "New group chat"
184msgstr ""
185
186#: ../ui/ContactsPage.qml:57
187msgid "Add to group"
188msgstr ""
189
190#: ../ui/ContactsPage.qml:59 ../ui/DialogsPage.qml:37
191msgid "Contacts"
192msgstr "Contactes"
193
194#: ../ui/ContactsPage.qml:81
195msgid "No contacts"
196msgstr "Cap contacte"
197
198#: ../ui/ContactsPage.qml:115
199msgid "Chat title"
200msgstr "Títol de la conversa"
201
202#. TRANSLATORS: the first argument refers to the number of members
203#. on a group conversation. The second one refers to the maximum
204#. number of members that are supporte for groups (currently 200).
205#: ../ui/ContactsPage.qml:201
206#, qt-format
207msgid "%1/%2 members"
208msgstr "%1/%2 membres"
209
210#: ../ui/ContactsPage.qml:244
211msgid "From Address Book"
212msgstr "De la llibreta d'adreces"
213
214#: ../ui/ContactsPage.qml:252
215msgid "Enter Details"
216msgstr "Introduïu els detalls"
217
218#: ../ui/ContactsPage.qml:273
219msgid "Text"
220msgstr ""
221
222#: ../ui/ContactsPage.qml:288 ../ui/SettingsPage.qml:53
223#: ../ui/SettingsPage.qml:103
224msgid "OK"
225msgstr "D'acord"
226
227#: ../ui/ContactsPage.qml:304
228#, qt-format
229msgid ""
230"Add %1 to %2?\n"
231"\n"
232"Number of last messages to forward:"
233msgstr ""
234
235#: ../ui/DialogPage.qml:23
236msgid "Send picture"
237msgstr "Envia una imatge"
238
239#: ../ui/DialogPage.qml:30
240msgid "Profile Info"
241msgstr ""
242
243#: ../ui/DialogPage.qml:37
244msgid "Add member"
245msgstr ""
246
247#: ../ui/DialogPage.qml:83
248msgid "Add to contacts"
249msgstr "Afegeix als contactes"
250
251#: ../ui/DialogPage.qml:115
252msgid "Type message"
253msgstr "Escriviu un missatge"
254
255#: ../ui/DialogsPage.qml:25
256msgid "Compose"
257msgstr "Escriviu un missatge"
258
259#: ../ui/DialogsPage.qml:31
260msgid "New Group"
261msgstr "Grup nou"
262
263#: ../ui/DialogsPage.qml:42 ../ui/SettingsPage.qml:10
264#: ../ui/SettingsPage.qml:25
265msgid "Settings"
266msgstr "Paràmetres"
267
268#: ../ui/DialogsPage.qml:57
269msgid "No chats"
270msgstr "No hi ha converses"
271
272#: ../ui/DialogsPage.qml:90
273msgid "typing..."
274msgstr "escrivint..."
275
276#: ../ui/IntroPage.qml:101
277msgid "Start Messaging"
278msgstr "Comenceu a utilitzar la missatgeria"
279
280#: ../ui/ProfilePage.qml:63
281msgid "Contact Info"
282msgstr ""
283
284#: ../ui/ProfilePage.qml:101 ../ui/ProfilePage.qml:123
285#: ../ui/ProfilePage.qml:135
286msgid "Unknown"
287msgstr ""
288
289#: ../ui/ProfilePage.qml:107
290msgid "last seen - unknown"
291msgstr ""
292
293#: ../ui/ProfilePage.qml:114
294msgid "Phone Number"
295msgstr ""
296
297#: ../ui/SettingsPage.qml:16
298msgid "Your Phone Number"
299msgstr "El vostre telèfon"
300
301#: ../ui/SettingsPage.qml:29
302msgid "Configure push"
303msgstr "Configura les notificacions"
304
305#: ../ui/SettingsPage.qml:41
306msgid "Terminate All Other Sessions"
307msgstr "Finalitza totes les altres sessions"
308
309#: ../ui/SettingsPage.qml:51
310msgid "Are you sure you want to terminate all other sessions?"
311msgstr "Segur que voleu finalitzar totes les altres sessions?"
312
313#: ../ui/SettingsPage.qml:70
314msgid "Support"
315msgstr "Assistència"
316
317#: ../ui/SettingsPage.qml:74
318msgid "Telegram FAQ"
319msgstr "PMF del Telegram"
320
321#: ../ui/SettingsPage.qml:80
322msgid "Ask a Question"
323msgstr "Envieu una pregunta"
324
325#: ../ui/SettingsPage.qml:92
326msgid "Log Out"
327msgstr "Surt"
328
329#: ../ui/SettingsPage.qml:101
330msgid "Are you sure you want to log out?"
331msgstr "Segur que voleu sortir?"
332
333#. TRANSLATORS: the argument refers to the version of the app
334#: ../ui/SettingsPage.qml:131
335#, qt-format
336msgid "Telegram for Ubuntu %1"
337msgstr "Telegram per a l'Ubuntu %1"
338
339#: ../ui/SignInPage.qml:12
340msgid "Your phone"
341msgstr ""
342
343#: ../ui/SignInPage.qml:130
344msgid ""
345"Please confirm your country code\n"
346"and enter your phone number."
347msgstr ""
348"Confirmeu el codi de país\n"
349"i introduïu el vostre número de telèfon."
350
351#: ../ui/SignInPage.qml:150 ../ui/VerificationCodePage.qml:129
352msgid "Please wait a moment and try again"
353msgstr "Espereu un moment i torneu-ho a provar"
354
355#: ../ui/SignInPage.qml:152
356msgid "Incorrect phone number."
357msgstr "Número de telèfon incorrecte."
358
359#: ../ui/SignUpPage.qml:10 ../ui/SignUpPage.qml:81
360msgid "Sign up"
361msgstr "Registra'm"
362
363#: ../ui/SignUpPage.qml:26
364msgid "Your first and last name:"
365msgstr "Nom i cognoms:"
366
367#: ../ui/SignUpPage.qml:102
368msgid "First name is required"
369msgstr "Cal que introduïu el nom"
370
371#: ../ui/VerificationCodePage.qml:12
372msgid "Your code"
373msgstr ""
374
375#: ../ui/VerificationCodePage.qml:32
376msgid ""
377"We've sent an SMS with an activation code.\n"
378"Please enter it below.\n"
379msgstr ""
380"Us hem enviat un missatge de text amb un codi d'activació.\n"
381"Introduïu-lo aquí sota.\n"
382
383#. TRANSLATORS: the argument refers to a countdown time
384#: ../ui/VerificationCodePage.qml:43 ../ui/VerificationCodePage.qml:103
385#, qt-format
386msgid "We will call you in %1"
387msgstr "Us trucarem en %1"
388
389#: ../ui/VerificationCodePage.qml:68
390msgid "Code"
391msgstr "Codi"
392
393#: ../ui/VerificationCodePage.qml:89
394msgid "Enter"
395msgstr "Retorn"
396
397#: ../ui/VerificationCodePage.qml:139
398msgid "Incorrect code. Please try again."
399msgstr "El codi és incorrecte. Torneu-ho a provar."
400
401#: ../ui/VerificationCodePage.qml:165
402msgid "Calling you..."
403msgstr "Us estem trucant..."
0404
=== added file 'po/com.ubuntu.telegram.pot'
--- po/com.ubuntu.telegram.pot 1970-01-01 00:00:00 +0000
+++ po/com.ubuntu.telegram.pot 2014-10-11 18:44:23 +0000
@@ -0,0 +1,400 @@
1# SOME DESCRIPTIVE TITLE.
2# Copyright (C) YEAR Canonical Ltd.
3# This file is distributed under the same license as the PACKAGE package.
4# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5#
6#, fuzzy
7msgid ""
8msgstr ""
9"Project-Id-Version: \n"
10"Report-Msgid-Bugs-To: \n"
11"POT-Creation-Date: 2014-10-11 18:52+0100\n"
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"
15"Language: \n"
16"MIME-Version: 1.0\n"
17"Content-Type: text/plain; charset=CHARSET\n"
18"Content-Transfer-Encoding: 8bit\n"
19
20#: ../components/TelegramContactsListItem.qml:61
21msgid "Contact"
22msgstr ""
23
24#: ../components/TelegramContactsListItem.qml:77
25msgid "Last seen"
26msgstr ""
27
28#: ../components/TelegramContactsListItem.qml:86 ../ui/AddContactPage.qml:231
29#: ../ui/ProfilePage.qml:39
30msgid "online"
31msgstr ""
32
33#. TRANSLATORS: the argument refers to a time
34#: ../components/TelegramContactsListItem.qml:89 ../ui/AddContactPage.qml:234
35#: ../ui/ProfilePage.qml:42
36#, qt-format
37msgid "last seen %1"
38msgstr ""
39
40#: ../components/TelegramHeader.qml:60
41msgid "Connecting..."
42msgstr ""
43
44#: ../components/TelegramHeader.qml:60 ../ui/ContactsPage.qml:276
45#: ../ui/SettingsPage.qml:54 ../ui/SettingsPage.qml:104
46#: telegram.desktop.in.in.h:1
47msgid "Telegram"
48msgstr ""
49
50#: ../components/TgButton.qml:9
51msgid "Next"
52msgstr ""
53
54#: ../library/uitest/ui/DialogDesignPage.qml:146
55msgid "Enter local path to send"
56msgstr ""
57
58#: ../library/uitest/ui/DialogDesignPage.qml:153
59msgid "Enter msg to send"
60msgstr ""
61
62#: ../library/uitest/ui/DialogsPage.qml:127 ../ui/DialogsPage.qml:90
63msgid "typing..."
64msgstr ""
65
66#: ../library/uitest/ui/SignInPageDesign.qml:44
67msgid ""
68"Please enter your full phone \n"
69"number with country code"
70msgstr ""
71
72#: ../library/uitest/ui/SignInPageDesign.qml:66
73msgid "with '+' sign"
74msgstr ""
75
76#: ../library/uitest/ui/SignUpPageDesign.qml:44
77msgid ""
78"You are not registered yet.\n"
79"Please provide registration data"
80msgstr ""
81
82#: ../library/uitest/ui/SignUpPageDesign.qml:66
83msgid "first name"
84msgstr ""
85
86#: ../library/uitest/ui/SignUpPageDesign.qml:78
87msgid "last name"
88msgstr ""
89
90#: ../library/uitest/ui/VerificationCodePageDesign.qml:43
91msgid ""
92"We have sent you a code via SMS.\n"
93"Please enter it below\n"
94msgstr ""
95
96#: ../library/uitest/ui/VerificationCodePageDesign.qml:73
97msgid "Enter your code"
98msgstr ""
99
100#: ../library/uitest/uitest.qml:112 ../library/uitest/uitest.qml:120
101msgid "The code you have entered is not valid. Try again"
102msgstr ""
103
104#: ../library/uitest/uitest.qml:140
105msgid "calling user's mobile"
106msgstr ""
107
108#: ../telegram.qml:397
109msgid "Push notifications"
110msgstr ""
111
112#: ../telegram.qml:398
113msgid "To enable push, sign in to your Ubuntu One account."
114msgstr ""
115
116#: ../telegram.qml:400
117msgid "Sign in to Ubuntu One"
118msgstr ""
119
120#: ../telegram.qml:408
121msgid "Remind me later"
122msgstr ""
123
124#: ../telegram.qml:412
125msgid "Don't use push"
126msgstr ""
127
128#: ../ui/AddContactPage.qml:27 ../ui/ContactsPage.qml:246
129msgid "Add Contact"
130msgstr ""
131
132#: ../ui/AddContactPage.qml:32 ../ui/SignInPage.qml:118
133msgid "Done"
134msgstr ""
135
136#: ../ui/AddContactPage.qml:37 ../ui/ContactsPage.qml:264
137#: ../ui/ContactsPage.qml:302 ../ui/SettingsPage.qml:66
138#: ../ui/SettingsPage.qml:118
139msgid "Cancel"
140msgstr ""
141
142#: ../ui/AddContactPage.qml:85
143msgid "+1 1234 56789"
144msgstr ""
145
146#: ../ui/AddContactPage.qml:103
147msgid "last seen yesterday at 19:16"
148msgstr ""
149
150#: ../ui/AddContactPage.qml:123
151msgid "Phone number (required)"
152msgstr ""
153
154#: ../ui/AddContactPage.qml:140 ../ui/SignUpPage.qml:50
155msgid "First name (required)"
156msgstr ""
157
158#: ../ui/AddContactPage.qml:156 ../ui/SignUpPage.qml:63
159msgid "Last name (optional)"
160msgstr ""
161
162#: ../ui/AddContactPage.qml:204
163msgid "Could not add contact"
164msgstr ""
165
166#: ../ui/ContactsPage.qml:26 ../ui/ContactsPage.qml:33
167#: ../ui/DialogsPage.qml:19
168msgid "Search"
169msgstr ""
170
171#: ../ui/ContactsPage.qml:38
172msgid "Add"
173msgstr ""
174
175#: ../ui/ContactsPage.qml:46
176msgid "Ok"
177msgstr ""
178
179#: ../ui/ContactsPage.qml:55
180msgid "New group chat"
181msgstr ""
182
183#: ../ui/ContactsPage.qml:57
184msgid "Add to group"
185msgstr ""
186
187#: ../ui/ContactsPage.qml:59 ../ui/DialogsPage.qml:37
188msgid "Contacts"
189msgstr ""
190
191#: ../ui/ContactsPage.qml:81
192msgid "No contacts"
193msgstr ""
194
195#: ../ui/ContactsPage.qml:115
196msgid "Chat title"
197msgstr ""
198
199#. TRANSLATORS: the first argument refers to the number of members
200#. on a group conversation. The second one refers to the maximum
201#. number of members that are supporte for groups (currently 200).
202#: ../ui/ContactsPage.qml:201
203#, qt-format
204msgid "%1/%2 members"
205msgstr ""
206
207#: ../ui/ContactsPage.qml:248
208msgid "From Address Book"
209msgstr ""
210
211#: ../ui/ContactsPage.qml:256
212msgid "Enter Details"
213msgstr ""
214
215#: ../ui/ContactsPage.qml:277
216msgid "Text"
217msgstr ""
218
219#: ../ui/ContactsPage.qml:292 ../ui/SettingsPage.qml:57
220#: ../ui/SettingsPage.qml:107
221msgid "OK"
222msgstr ""
223
224#: ../ui/ContactsPage.qml:308
225#, qt-format
226msgid ""
227"Add %1 to %2?\n"
228"\n"
229"Number of last messages to forward:"
230msgstr ""
231
232#: ../ui/DialogPage.qml:23
233msgid "Send picture"
234msgstr ""
235
236#: ../ui/DialogPage.qml:30
237msgid "Profile Info"
238msgstr ""
239
240#: ../ui/DialogPage.qml:37
241msgid "Add member"
242msgstr ""
243
244#: ../ui/DialogPage.qml:83
245msgid "Add to contacts"
246msgstr ""
247
248#: ../ui/DialogPage.qml:118
249msgid "Type message"
250msgstr ""
251
252#: ../ui/DialogPage.qml:224 ../ui/ProfilePage.qml:32
253msgid "DELETED"
254msgstr ""
255
256#: ../ui/DialogsPage.qml:25
257msgid "Compose"
258msgstr ""
259
260#: ../ui/DialogsPage.qml:31
261msgid "New Group"
262msgstr ""
263
264#: ../ui/DialogsPage.qml:42 ../ui/SettingsPage.qml:10
265#: ../ui/SettingsPage.qml:25
266msgid "Settings"
267msgstr ""
268
269#: ../ui/DialogsPage.qml:57
270msgid "No chats"
271msgstr ""
272
273#: ../ui/IntroPage.qml:103
274msgid "Start Messaging"
275msgstr ""
276
277#: ../ui/ProfilePage.qml:81
278msgid "Contact Info"
279msgstr ""
280
281#: ../ui/ProfilePage.qml:119 ../ui/ProfilePage.qml:141
282#: ../ui/ProfilePage.qml:153
283msgid "Unknown"
284msgstr ""
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches