diff --git a/.bzrignore b/.bzrignore index a797d0cfc05..ba5258506be 100644 --- a/.bzrignore +++ b/.bzrignore @@ -10,3 +10,5 @@ RE:^include/ RE:^share/ RE:^man/ RE:^lib/ + +RE:^doc/_build/ diff --git a/addons/web/__openerp__.py b/addons/web/__openerp__.py index 75c3bbd766f..1ca0553c8e2 100644 --- a/addons/web/__openerp__.py +++ b/addons/web/__openerp__.py @@ -15,13 +15,11 @@ "static/lib/datejs/parser.js", "static/lib/datejs/sugarpak.js", "static/lib/datejs/extras.js", - #"static/lib/jquery/jquery-1.6.4.js", "static/lib/jquery/jquery-1.7.2b1.js", "static/lib/jquery.MD5/jquery.md5.js", "static/lib/jquery.form/jquery.form.js", "static/lib/jquery.validate/jquery.validate.js", "static/lib/jquery.ba-bbq/jquery.ba-bbq.js", - "static/lib/jquery.contextmenu/jquery.contextmenu.r2.packed.js", "static/lib/jquery.blockUI/jquery.blockUI.js", "static/lib/jquery.superfish/js/hoverIntent.js", "static/lib/jquery.superfish/js/superfish.js", @@ -35,11 +33,26 @@ "static/lib/qweb/qweb2.js", "static/lib/underscore/underscore.js", "static/lib/underscore/underscore.string.js", + "static/lib/backbone/backbone.js", + + "static/lib/visualsearch/lib/js/visualsearch.js", + "static/lib/visualsearch/lib/js/utils/backbone_extensions.js", + "static/lib/visualsearch/lib/js/utils/hotkeys.js", + "static/lib/visualsearch/lib/js/utils/inflector.js", + "static/lib/visualsearch/lib/js/utils/jquery_extensions.js", + "static/lib/visualsearch/lib/js/utils/search_parser.js", + "static/lib/visualsearch/lib/js/models/search_facets.js", + "static/lib/visualsearch/lib/js/models/search_query.js", + "static/lib/visualsearch/lib/js/templates/templates.js", + "static/lib/visualsearch/lib/js/views/search_facet.js", + "static/lib/visualsearch/lib/js/views/search_input.js", + "static/lib/visualsearch/lib/js/views/search_box.js", + "static/lib/labjs/LAB.src.js", "static/lib/py.js/lib/py.js", - "static/lib/novajs/src/nova.js", "static/src/js/boot.js", - "static/src/js/core.js", + "static/src/js/corelib.js", + "static/src/js/coresetup.js", "static/src/js/dates.js", "static/src/js/formats.js", "static/src/js/chrome.js", @@ -49,7 +62,6 @@ "static/src/js/data_import.js", "static/src/js/search.js", "static/src/js/view_form.js", - "static/src/js/view_page.js", "static/src/js/view_list.js", "static/src/js/view_list_editable.js", "static/src/js/view_tree.js", @@ -57,11 +69,14 @@ ], 'css' : [ "static/lib/jquery.superfish/css/superfish.css", - "static/lib/jquery.ui/css/smoothness/jquery-ui-1.8.17.custom.css", + "static/lib/jquery.ui.bootstrap/css/custom-theme/jquery-ui-1.8.16.custom.css", "static/lib/jquery.ui.timepicker/css/jquery-ui-timepicker-addon.css", "static/lib/jquery.ui.notify/css/ui.notify.css", "static/lib/jquery.tipsy/tipsy.css", - "static/src/css/base_old.css", + "static/lib/visualsearch/lib/css/reset.css", + "static/lib/visualsearch/lib/css/workspace.css", + "static/lib/visualsearch/lib/css/icons.css", +# "static/src/css/base_old.css", "static/src/css/base.css", "static/src/css/data_export.css", "static/src/css/data_import.css", diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 46f57b37682..1cdeb50cf25 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -79,7 +79,7 @@ def concat_files(file_list, reader=None, intersperse=""): if reader is None: def reader(f): - with open(f) as fp: + with open(f, 'rb') as fp: return fp.read() files_content = [] @@ -261,8 +261,8 @@ class WebClient(openerpweb.Controller): def reader(f): """read the a css file and absolutify all relative uris""" - with open(f) as fp: - data = fp.read() + with open(f, 'rb') as fp: + data = fp.read().decode('utf-8') path = file_map[f] # convert FS path into web path @@ -279,7 +279,7 @@ class WebClient(openerpweb.Controller): r"""url(\1%s/""" % (web_dir,), data, ) - return data + return data.encode('utf-8') content, checksum = concat_files((f[0] for f in files), reader) @@ -802,9 +802,6 @@ def fix_view_modes(action): new view mode ``list`` which is the result of the ``tree`` view_mode in conjunction with the ``form`` view_type. - This method also adds a ``page`` view mode in case there is a ``form`` in - the input action. - TODO: this should go into the doc, some kind of "peculiarities" section :param dict action: an action descriptor @@ -818,8 +815,6 @@ def fix_view_modes(action): if mode == 'form': id_form = id break - if id_form is not None: - action['views'].insert(index + 1, (id_form, 'page')) if action.pop('view_type', 'form') != 'form': return action @@ -1154,6 +1149,7 @@ class View(openerpweb.Controller): arch = fvg['arch'].encode('utf-8') else: arch = fvg['arch'] + fvg['arch_string'] = arch if transform: evaluation_context = session.evaluation_context(context or {}) diff --git a/addons/web/i18n/gu.po b/addons/web/i18n/gu.po new file mode 100644 index 00000000000..4f675076ece --- /dev/null +++ b/addons/web/i18n/gu.po @@ -0,0 +1,1544 @@ +# Gujarati translation for openerp-web +# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012 +# This file is distributed under the same license as the openerp-web package. +# FIRST AUTHOR , 2012. +# +msgid "" +msgstr "" +"Project-Id-Version: openerp-web\n" +"Report-Msgid-Bugs-To: FULL NAME \n" +"POT-Creation-Date: 2012-02-14 15:27+0100\n" +"PO-Revision-Date: 2012-04-16 11:31+0000\n" +"Last-Translator: FULL NAME \n" +"Language-Team: Gujarati \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Launchpad-Export-Date: 2012-04-17 05:24+0000\n" +"X-Generator: Launchpad (build 15099)\n" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:172 +#: addons/web/static/src/js/chrome.js:198 +#: addons/web/static/src/js/chrome.js:414 +#: addons/web/static/src/js/view_form.js:419 +#: addons/web/static/src/js/view_form.js:1233 +#: addons/web/static/src/xml/base.xml:1695 +#: addons/web/static/src/js/view_form.js:424 +#: addons/web/static/src/js/view_form.js:1239 +msgid "Ok" +msgstr "બરાબર" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:180 +msgid "Send OpenERP Enterprise Report" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:194 +msgid "Dont send" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:256 +#, python-format +msgid "Loading (%d)" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:288 +msgid "Invalid database name" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:483 +msgid "Backed" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:484 +msgid "Database backed up successfully" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:527 +msgid "Restored" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:527 +msgid "Database restored successfully" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:708 +#: addons/web/static/src/xml/base.xml:359 +msgid "About" +msgstr "ના વિશે" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:787 +#: addons/web/static/src/xml/base.xml:356 +msgid "Preferences" +msgstr "સામાન્ય પસંદગીઓ" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:790 +#: addons/web/static/src/js/search.js:239 +#: addons/web/static/src/js/search.js:288 +#: addons/web/static/src/js/view_editor.js:95 +#: addons/web/static/src/js/view_editor.js:836 +#: addons/web/static/src/js/view_editor.js:962 +#: addons/web/static/src/js/view_form.js:1228 +#: addons/web/static/src/xml/base.xml:738 +#: addons/web/static/src/xml/base.xml:1496 +#: addons/web/static/src/xml/base.xml:1506 +#: addons/web/static/src/xml/base.xml:1515 +#: addons/web/static/src/js/search.js:293 +#: addons/web/static/src/js/view_form.js:1234 +msgid "Cancel" +msgstr "રદ કરો" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:791 +msgid "Change password" +msgstr "પાસવર્ડ બદલો" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:792 +#: addons/web/static/src/js/view_editor.js:73 +#: addons/web/static/src/js/views.js:962 +#: addons/web/static/src/xml/base.xml:737 +#: addons/web/static/src/xml/base.xml:1500 +#: addons/web/static/src/xml/base.xml:1514 +msgid "Save" +msgstr "સાચવો" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:811 +#: addons/web/static/src/xml/base.xml:226 +#: addons/web/static/src/xml/base.xml:1729 +msgid "Change Password" +msgstr "પાસવર્ડ બદલો" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:1096 +#: addons/web/static/src/js/chrome.js:1100 +msgid "OpenERP - Unsupported/Community Version" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/chrome.js:1131 +#: addons/web/static/src/js/chrome.js:1135 +msgid "Client Error" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/data_export.js:6 +msgid "Export Data" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/data_export.js:19 +#: addons/web/static/src/js/data_import.js:69 +#: addons/web/static/src/js/view_editor.js:49 +#: addons/web/static/src/js/view_editor.js:398 +#: addons/web/static/src/js/view_form.js:692 +#: addons/web/static/src/js/view_form.js:3044 +#: addons/web/static/src/js/views.js:963 +#: addons/web/static/src/js/view_form.js:698 +#: addons/web/static/src/js/view_form.js:3067 +msgid "Close" +msgstr "બંધ કરો" + +#. openerp-web +#: addons/web/static/src/js/data_export.js:20 +msgid "Export To File" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/data_export.js:125 +msgid "Please enter save field list name" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/data_export.js:360 +msgid "Please select fields to save export list..." +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/data_export.js:373 +msgid "Please select fields to export..." +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/data_import.js:34 +msgid "Import Data" +msgstr "માહિતી આયાત કરો" + +#. openerp-web +#: addons/web/static/src/js/data_import.js:70 +msgid "Import File" +msgstr "ફાઈલ આયાત કરો" + +#. openerp-web +#: addons/web/static/src/js/data_import.js:105 +msgid "External ID" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/formats.js:300 +#: addons/web/static/src/js/view_page.js:245 +#: addons/web/static/src/js/formats.js:322 +#: addons/web/static/src/js/view_page.js:251 +msgid "Download" +msgstr "ડાઉનલોડ" + +#. openerp-web +#: addons/web/static/src/js/formats.js:305 +#: addons/web/static/src/js/formats.js:327 +#, python-format +msgid "Download \"%s\"" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:191 +msgid "Filter disabled due to invalid syntax" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:237 +msgid "Filter Entry" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:242 +#: addons/web/static/src/js/search.js:291 +#: addons/web/static/src/js/search.js:296 +msgid "OK" +msgstr "ઓકે" + +#. openerp-web +#: addons/web/static/src/js/search.js:286 +#: addons/web/static/src/xml/base.xml:1292 +#: addons/web/static/src/js/search.js:291 +msgid "Add to Dashboard" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:415 +#: addons/web/static/src/js/search.js:420 +msgid "Invalid Search" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:415 +#: addons/web/static/src/js/search.js:420 +msgid "triggered from search view" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:503 +#: addons/web/static/src/js/search.js:508 +#, python-format +msgid "Incorrect value for field %(fieldname)s: [%(value)s] is %(message)s" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:839 +#: addons/web/static/src/js/search.js:844 +msgid "not a valid integer" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:853 +#: addons/web/static/src/js/search.js:858 +msgid "not a valid number" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:931 +#: addons/web/static/src/xml/base.xml:968 +#: addons/web/static/src/js/search.js:936 +msgid "Yes" +msgstr "હાં" + +#. openerp-web +#: addons/web/static/src/js/search.js:932 +#: addons/web/static/src/js/search.js:937 +msgid "No" +msgstr "નહીં" + +#. openerp-web +#: addons/web/static/src/js/search.js:1290 +#: addons/web/static/src/js/search.js:1295 +msgid "contains" +msgstr "સમાવે છે" + +#. openerp-web +#: addons/web/static/src/js/search.js:1291 +#: addons/web/static/src/js/search.js:1296 +msgid "doesn't contain" +msgstr "સમાવતું નથી" + +#. openerp-web +#: addons/web/static/src/js/search.js:1292 +#: addons/web/static/src/js/search.js:1306 +#: addons/web/static/src/js/search.js:1325 +#: addons/web/static/src/js/search.js:1344 +#: addons/web/static/src/js/search.js:1365 +#: addons/web/static/src/js/search.js:1297 +#: addons/web/static/src/js/search.js:1311 +#: addons/web/static/src/js/search.js:1330 +#: addons/web/static/src/js/search.js:1349 +#: addons/web/static/src/js/search.js:1370 +msgid "is equal to" +msgstr "ને બરાબર છે" + +#. openerp-web +#: addons/web/static/src/js/search.js:1293 +#: addons/web/static/src/js/search.js:1307 +#: addons/web/static/src/js/search.js:1326 +#: addons/web/static/src/js/search.js:1345 +#: addons/web/static/src/js/search.js:1366 +#: addons/web/static/src/js/search.js:1298 +#: addons/web/static/src/js/search.js:1312 +#: addons/web/static/src/js/search.js:1331 +#: addons/web/static/src/js/search.js:1350 +#: addons/web/static/src/js/search.js:1371 +msgid "is not equal to" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:1294 +#: addons/web/static/src/js/search.js:1308 +#: addons/web/static/src/js/search.js:1327 +#: addons/web/static/src/js/search.js:1346 +#: addons/web/static/src/js/search.js:1367 +#: addons/web/static/src/js/search.js:1299 +#: addons/web/static/src/js/search.js:1313 +#: addons/web/static/src/js/search.js:1332 +#: addons/web/static/src/js/search.js:1351 +#: addons/web/static/src/js/search.js:1372 +msgid "greater than" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:1295 +#: addons/web/static/src/js/search.js:1309 +#: addons/web/static/src/js/search.js:1328 +#: addons/web/static/src/js/search.js:1347 +#: addons/web/static/src/js/search.js:1368 +#: addons/web/static/src/js/search.js:1300 +#: addons/web/static/src/js/search.js:1314 +#: addons/web/static/src/js/search.js:1333 +#: addons/web/static/src/js/search.js:1352 +#: addons/web/static/src/js/search.js:1373 +msgid "less than" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:1296 +#: addons/web/static/src/js/search.js:1310 +#: addons/web/static/src/js/search.js:1329 +#: addons/web/static/src/js/search.js:1348 +#: addons/web/static/src/js/search.js:1369 +#: addons/web/static/src/js/search.js:1301 +#: addons/web/static/src/js/search.js:1315 +#: addons/web/static/src/js/search.js:1334 +#: addons/web/static/src/js/search.js:1353 +#: addons/web/static/src/js/search.js:1374 +msgid "greater or equal than" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:1297 +#: addons/web/static/src/js/search.js:1311 +#: addons/web/static/src/js/search.js:1330 +#: addons/web/static/src/js/search.js:1349 +#: addons/web/static/src/js/search.js:1370 +#: addons/web/static/src/js/search.js:1302 +#: addons/web/static/src/js/search.js:1316 +#: addons/web/static/src/js/search.js:1335 +#: addons/web/static/src/js/search.js:1354 +#: addons/web/static/src/js/search.js:1375 +msgid "less or equal than" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:1360 +#: addons/web/static/src/js/search.js:1383 +#: addons/web/static/src/js/search.js:1365 +#: addons/web/static/src/js/search.js:1388 +msgid "is" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:1384 +#: addons/web/static/src/js/search.js:1389 +msgid "is not" +msgstr "એ નથી" + +#. openerp-web +#: addons/web/static/src/js/search.js:1396 +#: addons/web/static/src/js/search.js:1401 +msgid "is true" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/search.js:1397 +#: addons/web/static/src/js/search.js:1402 +msgid "is false" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:20 +#, python-format +msgid "Manage Views (%s)" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:46 +#: addons/web/static/src/js/view_list.js:17 +#: addons/web/static/src/xml/base.xml:100 +#: addons/web/static/src/xml/base.xml:327 +#: addons/web/static/src/xml/base.xml:756 +msgid "Create" +msgstr "બનાવો" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:47 +#: addons/web/static/src/xml/base.xml:483 +#: addons/web/static/src/xml/base.xml:755 +msgid "Edit" +msgstr "ફેરફાર કરો" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:48 +#: addons/web/static/src/xml/base.xml:1647 +msgid "Remove" +msgstr "દૂર કરો" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:71 +#, python-format +msgid "Create a view (%s)" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:168 +msgid "Do you really want to remove this view?" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:364 +#, python-format +msgid "View Editor %d - %s" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:367 +msgid "Inherited View" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:371 +msgid "Do you really wants to create an inherited view here?" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:381 +msgid "Preview" +msgstr "પૂર્વદર્શન" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:501 +msgid "Do you really want to remove this node?" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:815 +#: addons/web/static/src/js/view_editor.js:939 +msgid "Properties" +msgstr "ગુણધર્મો" + +#. openerp-web +#: addons/web/static/src/js/view_editor.js:818 +#: addons/web/static/src/js/view_editor.js:942 +msgid "Update" +msgstr "સુધારો" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:16 +msgid "Form" +msgstr "ફોર્મ" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:121 +#: addons/web/static/src/js/views.js:803 +msgid "Customize" +msgstr "વૈવિધ્યપૂર્ણ" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:123 +#: addons/web/static/src/js/view_form.js:686 +#: addons/web/static/src/js/view_form.js:692 +msgid "Set Default" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:469 +#: addons/web/static/src/js/view_form.js:475 +msgid "" +"Warning, the record has been modified, your changes will be discarded." +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:693 +#: addons/web/static/src/js/view_form.js:699 +msgid "Save default" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:754 +#: addons/web/static/src/js/view_form.js:760 +msgid "Attachments" +msgstr "જોડાણો" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:792 +#: addons/web/static/src/js/view_form.js:798 +#, python-format +msgid "Do you really want to delete the attachment %s?" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:822 +#: addons/web/static/src/js/view_form.js:828 +#, python-format +msgid "Unknown operator %s in domain %s" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:830 +#: addons/web/static/src/js/view_form.js:836 +#, python-format +msgid "Unknown field %s in domain %s" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:868 +#: addons/web/static/src/js/view_form.js:874 +#, python-format +msgid "Unsupported operator %s in domain %s" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:1225 +#: addons/web/static/src/js/view_form.js:1231 +msgid "Confirm" +msgstr "ખાતરી" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:1921 +#: addons/web/static/src/js/view_form.js:2578 +#: addons/web/static/src/js/view_form.js:2741 +#: addons/web/static/src/js/view_form.js:1933 +#: addons/web/static/src/js/view_form.js:2590 +#: addons/web/static/src/js/view_form.js:2760 +msgid "Open: " +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:2049 +#: addons/web/static/src/js/view_form.js:2061 +msgid "   Search More..." +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:2062 +#: addons/web/static/src/js/view_form.js:2074 +#, python-format +msgid "   Create \"%s\"" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:2068 +#: addons/web/static/src/js/view_form.js:2080 +msgid "   Create and Edit..." +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:2101 +#: addons/web/static/src/js/views.js:675 +#: addons/web/static/src/js/view_form.js:2113 +msgid "Search: " +msgstr "શોધો: " + +#. openerp-web +#: addons/web/static/src/js/view_form.js:2101 +#: addons/web/static/src/js/view_form.js:2550 +#: addons/web/static/src/js/view_form.js:2113 +#: addons/web/static/src/js/view_form.js:2562 +msgid "Create: " +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:2661 +#: addons/web/static/src/xml/base.xml:750 +#: addons/web/static/src/xml/base.xml:772 +#: addons/web/static/src/xml/base.xml:1646 +#: addons/web/static/src/js/view_form.js:2680 +msgid "Add" +msgstr "ઉમેરવું" + +#. openerp-web +#: addons/web/static/src/js/view_form.js:2721 +#: addons/web/static/src/js/view_form.js:2740 +msgid "Add: " +msgstr "ઉમેરવું: " + +#. openerp-web +#: addons/web/static/src/js/view_list.js:8 +msgid "List" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_list.js:269 +msgid "Unlimited" +msgstr "અમર્યાદિત" + +#. openerp-web +#: addons/web/static/src/js/view_list.js:305 +#: addons/web/static/src/js/view_list.js:309 +#, python-format +msgid "[%(first_record)d to %(last_record)d] of %(records_count)d" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_list.js:524 +#: addons/web/static/src/js/view_list.js:528 +msgid "Do you really want to remove these records?" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_list.js:1230 +#: addons/web/static/src/js/view_list.js:1232 +msgid "Undefined" +msgstr "અવ્યાખ્યાયિત" + +#. openerp-web +#: addons/web/static/src/js/view_list.js:1327 +#: addons/web/static/src/js/view_list.js:1331 +#, python-format +msgid "%(page)d/%(page_count)d" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_page.js:8 +msgid "Page" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_page.js:52 +msgid "Do you really want to delete this record?" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/view_tree.js:11 +msgid "Tree" +msgstr "ટ્રી" + +#. openerp-web +#: addons/web/static/src/js/views.js:565 +#: addons/web/static/src/xml/base.xml:480 +msgid "Fields View Get" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/views.js:573 +#, python-format +msgid "View Log (%s)" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/views.js:600 +#, python-format +msgid "Model %s fields" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/views.js:610 +#: addons/web/static/src/xml/base.xml:482 +msgid "Manage Views" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/views.js:611 +msgid "Could not find current view declaration" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/views.js:805 +msgid "Translate" +msgstr "ભાષાંતર" + +#. openerp-web +#: addons/web/static/src/js/views.js:807 +msgid "Technical translation" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/views.js:811 +msgid "Other Options" +msgstr "અન્ય વિકલ્પો" + +#. openerp-web +#: addons/web/static/src/js/views.js:814 +#: addons/web/static/src/xml/base.xml:1736 +msgid "Import" +msgstr "આયાત" + +#. openerp-web +#: addons/web/static/src/js/views.js:817 +#: addons/web/static/src/xml/base.xml:1606 +msgid "Export" +msgstr "નિકાસ" + +#. openerp-web +#: addons/web/static/src/js/views.js:825 +msgid "Reports" +msgstr "અહેવાલો" + +#. openerp-web +#: addons/web/static/src/js/views.js:825 +msgid "Actions" +msgstr "ક્રિયાઓ" + +#. openerp-web +#: addons/web/static/src/js/views.js:825 +msgid "Links" +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/views.js:919 +msgid "You must choose at least one record." +msgstr "" + +#. openerp-web +#: addons/web/static/src/js/views.js:920 +msgid "Warning" +msgstr "ચેતવણી" + +#. openerp-web +#: addons/web/static/src/js/views.js:957 +msgid "Translations" +msgstr "ભાષાંતરો" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:44 +#: addons/web/static/src/xml/base.xml:315 +msgid "Powered by" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:44 +#: addons/web/static/src/xml/base.xml:315 +#: addons/web/static/src/xml/base.xml:1813 +msgid "OpenERP" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:52 +msgid "Loading..." +msgstr "લાવી રહ્યા છીએ..." + +#. openerp-web +#: addons/web/static/src/xml/base.xml:61 +msgid "CREATE DATABASE" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:68 +#: addons/web/static/src/xml/base.xml:211 +msgid "Master password:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:72 +#: addons/web/static/src/xml/base.xml:191 +msgid "New database name:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:77 +msgid "Load Demonstration data:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:81 +msgid "Default language:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:91 +msgid "Admin password:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:95 +msgid "Confirm password:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:109 +msgid "DROP DATABASE" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:116 +#: addons/web/static/src/xml/base.xml:150 +#: addons/web/static/src/xml/base.xml:301 +msgid "Database:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:128 +#: addons/web/static/src/xml/base.xml:162 +#: addons/web/static/src/xml/base.xml:187 +msgid "Master Password:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:132 +#: addons/web/static/src/xml/base.xml:328 +msgid "Drop" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:143 +msgid "BACKUP DATABASE" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:166 +#: addons/web/static/src/xml/base.xml:329 +msgid "Backup" +msgstr "બેકઅપ" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:175 +msgid "RESTORE DATABASE" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:182 +msgid "File:" +msgstr "ફાઇલ:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:195 +#: addons/web/static/src/xml/base.xml:330 +msgid "Restore" +msgstr "પુનઃસ્થાપિત કરો" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:204 +msgid "CHANGE MASTER PASSWORD" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:216 +msgid "New master password:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:221 +msgid "Confirm new master password:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:251 +msgid "" +"Your version of OpenERP is unsupported. Support & maintenance services are " +"available here:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:251 +msgid "OpenERP Entreprise" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:256 +msgid "OpenERP Enterprise Contract." +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:257 +msgid "Your report will be sent to the OpenERP Enterprise team." +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:259 +msgid "Summary:" +msgstr "સાર:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:263 +msgid "Description:" +msgstr "વર્ણન:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:267 +msgid "What you did:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:297 +msgid "Invalid username or password" +msgstr "અયોગ્ય વપરાશકર્તા નામ અથવા પાસવર્ડ" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:306 +msgid "Username" +msgstr "વપરાશકર્તા નામ" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:308 +#: addons/web/static/src/xml/base.xml:331 +msgid "Password" +msgstr "પાસવર્ડ" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:310 +msgid "Log in" +msgstr "લોગ ઇન" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:314 +msgid "Manage Databases" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:332 +msgid "Back to Login" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:353 +msgid "Home" +msgstr "હોમ" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:363 +msgid "LOGOUT" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:388 +msgid "Fold menu" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:389 +msgid "Unfold menu" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:454 +msgid "Hide this tip" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:455 +msgid "Disable all tips" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:463 +msgid "Add / Remove Shortcut..." +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:471 +msgid "More…" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:477 +msgid "Debug View#" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:478 +msgid "View Log (perm_read)" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:479 +msgid "View Fields" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:483 +msgid "View" +msgstr "દેખાવ" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:484 +msgid "Edit SearchView" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:485 +msgid "Edit Action" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:486 +msgid "Edit Workflow" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:491 +msgid "ID:" +msgstr "ID:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:494 +msgid "XML ID:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:497 +msgid "Creation User:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:500 +msgid "Creation Date:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:503 +msgid "Latest Modification by:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:506 +msgid "Latest Modification Date:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:542 +msgid "Field" +msgstr "ક્ષેત્ર" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:632 +#: addons/web/static/src/xml/base.xml:758 +#: addons/web/static/src/xml/base.xml:1708 +msgid "Delete" +msgstr "રદ્દ કરો" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:757 +msgid "Duplicate" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:775 +msgid "Add attachment" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:801 +msgid "Default:" +msgstr "મૂળભૂત:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:818 +msgid "Condition:" +msgstr "શરત:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:837 +msgid "Only you" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:844 +msgid "All users" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:851 +msgid "Unhandled widget" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:900 +msgid "Notebook Page \"" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:905 +#: addons/web/static/src/xml/base.xml:964 +msgid "Modifiers:" +msgstr "સુધારકો:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:931 +msgid "(nolabel)" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:936 +msgid "Field:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:940 +msgid "Object:" +msgstr "વસ્તુ:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:944 +msgid "Type:" +msgstr "પ્રકાર:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:948 +msgid "Widget:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:952 +msgid "Size:" +msgstr "કદ:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:956 +msgid "Context:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:960 +msgid "Domain:" +msgstr "ડોમેઇન:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:968 +msgid "Change default:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:972 +msgid "On change:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:976 +msgid "Relation:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:980 +msgid "Selection:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1020 +msgid "Send an e-mail with your default e-mail client" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1034 +msgid "Open this resource" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1056 +msgid "Select date" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1090 +msgid "Open..." +msgstr "ખોલો..." + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1091 +msgid "Create..." +msgstr "બનાવો..." + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1092 +msgid "Search..." +msgstr "શોધ..." + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1095 +msgid "..." +msgstr "..." + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1155 +#: addons/web/static/src/xml/base.xml:1198 +msgid "Set Image" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1163 +#: addons/web/static/src/xml/base.xml:1213 +#: addons/web/static/src/xml/base.xml:1215 +#: addons/web/static/src/xml/base.xml:1272 +msgid "Clear" +msgstr "સાફ" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1172 +#: addons/web/static/src/xml/base.xml:1223 +msgid "Uploading ..." +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1200 +#: addons/web/static/src/xml/base.xml:1495 +msgid "Select" +msgstr "પસંદ કરો" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1207 +#: addons/web/static/src/xml/base.xml:1209 +msgid "Save As" +msgstr "આ રીતે સંગ્રહિત કરો" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1238 +msgid "Button" +msgstr "બટન" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1241 +msgid "(no string)" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1248 +msgid "Special:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1253 +msgid "Button Type:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1257 +msgid "Method:" +msgstr "પદ્દતિ:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1261 +msgid "Action ID:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1271 +msgid "Search" +msgstr "શોધો" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1279 +msgid "Filters" +msgstr "ફિલ્ટરો" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1280 +msgid "-- Filters --" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1289 +msgid "-- Actions --" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1290 +msgid "Add Advanced Filter" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1291 +msgid "Save Filter" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1293 +msgid "Manage Filters" +msgstr "ફિલ્ટરો ને સંચાલિત કરો" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1298 +msgid "Filter Name:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1300 +msgid "(Any existing filter with the same name will be replaced)" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1305 +msgid "Select Dashboard to add this filter to:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1309 +msgid "Title of new Dashboard item:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1416 +msgid "Advanced Filters" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1426 +msgid "Any of the following conditions must match" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1427 +msgid "All the following conditions must match" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1428 +msgid "None of the following conditions must match" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1435 +msgid "Add condition" +msgstr "શરત ઉમેરો" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1436 +msgid "and" +msgstr "અને" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1503 +msgid "Save & New" +msgstr "સંગ્રહો અને નવું" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1504 +msgid "Save & Close" +msgstr "સંગ્રહો અને બંધ કરો" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1611 +msgid "" +"This wizard will export all data that matches the current search criteria to " +"a CSV file.\n" +" You can export all data or only the fields that can be " +"reimported after modification." +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1618 +msgid "Export Type:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1620 +msgid "Import Compatible Export" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1621 +msgid "Export all Data" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1624 +msgid "Export Formats" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1630 +msgid "Available fields" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1632 +msgid "Fields to export" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1634 +msgid "Save fields list" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1648 +msgid "Remove All" +msgstr "બધું દૂર કરો" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1660 +msgid "Name" +msgstr "નામ" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1693 +msgid "Save as:" +msgstr "આ રૂપમાં સાચવો:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1700 +msgid "Saved exports:" +msgstr "સચવાયેલા નિકાસ:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1714 +msgid "Old Password:" +msgstr "જૂનું પાસવર્ડ:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1719 +msgid "New Password:" +msgstr "નવો પાસવર્ડ:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1724 +msgid "Confirm Password:" +msgstr "પાસવર્ડની પુષ્ટિ કરો:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1742 +msgid "1. Import a .CSV file" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1743 +msgid "" +"Select a .CSV file to import. If you need a sample of file to import,\n" +" you should use the export tool with the \"Import Compatible\" option." +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1747 +msgid "CSV File:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1750 +msgid "2. Check your file format" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1753 +msgid "Import Options" +msgstr "આયાત વિકલ્પો" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1757 +msgid "Does your file have titles?" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1763 +msgid "Separator:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1765 +msgid "Delimiter:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1769 +msgid "Encoding:" +msgstr "એનકોડીંગ:" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1772 +msgid "UTF-8" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1773 +msgid "Latin 1" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1776 +msgid "Lines to skip" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1776 +msgid "" +"For use if CSV files have titles on multiple lines, skips more than a single " +"line during import" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1803 +msgid "The import failed due to:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1805 +msgid "Here is a preview of the file we could not import:" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1812 +msgid "Activate the developper mode" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1814 +msgid "Version" +msgstr "આવૃત્તિ" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1815 +msgid "Copyright © 2004-TODAY OpenERP SA. All Rights Reserved." +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1816 +msgid "OpenERP is a trademark of the" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1817 +msgid "OpenERP SA Company" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1819 +msgid "Licenced under the terms of" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1820 +msgid "GNU Affero General Public License" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1822 +msgid "For more information visit" +msgstr "" + +#. openerp-web +#: addons/web/static/src/xml/base.xml:1823 +msgid "OpenERP.com" +msgstr "" diff --git a/addons/web/i18n/nl.po b/addons/web/i18n/nl.po index 78cd13ffd97..d2f97026967 100644 --- a/addons/web/i18n/nl.po +++ b/addons/web/i18n/nl.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: openerp-web\n" "Report-Msgid-Bugs-To: FULL NAME \n" "POT-Creation-Date: 2012-02-14 15:27+0100\n" -"PO-Revision-Date: 2012-04-02 13:15+0000\n" +"PO-Revision-Date: 2012-04-16 12:21+0000\n" "Last-Translator: Erwin \n" "Language-Team: Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"X-Launchpad-Export-Date: 2012-04-03 05:16+0000\n" -"X-Generator: Launchpad (build 15052)\n" +"X-Launchpad-Export-Date: 2012-04-17 05:23+0000\n" +"X-Generator: Launchpad (build 15099)\n" #. openerp-web #: addons/web/static/src/js/chrome.js:172 @@ -53,7 +53,7 @@ msgstr "Ongeldige database naam" #. openerp-web #: addons/web/static/src/js/chrome.js:483 msgid "Backed" -msgstr "" +msgstr "Back-up gereed" #. openerp-web #: addons/web/static/src/js/chrome.js:484 diff --git a/addons/web/static/lib/backbone/backbone.js b/addons/web/static/lib/backbone/backbone.js new file mode 100644 index 00000000000..7c56f42363c --- /dev/null +++ b/addons/web/static/lib/backbone/backbone.js @@ -0,0 +1,1290 @@ +// Backbone.js 0.9.1 + +// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc. +// Backbone may be freely distributed under the MIT license. +// For all details and documentation: +// http://backbonejs.org + +(function(){ + + // Initial Setup + // ------------- + + // Save a reference to the global object (`window` in the browser, `global` + // on the server). + var root = this; + + // Save the previous value of the `Backbone` variable, so that it can be + // restored later on, if `noConflict` is used. + var previousBackbone = root.Backbone; + + // Create a local reference to slice/splice. + var slice = Array.prototype.slice; + var splice = Array.prototype.splice; + + // The top-level namespace. All public Backbone classes and modules will + // be attached to this. Exported for both CommonJS and the browser. + var Backbone; + if (typeof exports !== 'undefined') { + Backbone = exports; + } else { + Backbone = root.Backbone = {}; + } + + // Current version of the library. Keep in sync with `package.json`. + Backbone.VERSION = '0.9.1'; + + // Require Underscore, if we're on the server, and it's not already present. + var _ = root._; + if (!_ && (typeof require !== 'undefined')) _ = require('underscore'); + + // For Backbone's purposes, jQuery, Zepto, or Ender owns the `$` variable. + var $ = root.jQuery || root.Zepto || root.ender; + + // Set the JavaScript library that will be used for DOM manipulation and + // Ajax calls (a.k.a. the `$` variable). By default Backbone will use: jQuery, + // Zepto, or Ender; but the `setDomLibrary()` method lets you inject an + // alternate JavaScript library (or a mock library for testing your views + // outside of a browser). + Backbone.setDomLibrary = function(lib) { + $ = lib; + }; + + // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable + // to its previous owner. Returns a reference to this Backbone object. + Backbone.noConflict = function() { + root.Backbone = previousBackbone; + return this; + }; + + // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option + // will fake `"PUT"` and `"DELETE"` requests via the `_method` parameter and + // set a `X-Http-Method-Override` header. + Backbone.emulateHTTP = false; + + // Turn on `emulateJSON` to support legacy servers that can't deal with direct + // `application/json` requests ... will encode the body as + // `application/x-www-form-urlencoded` instead and will send the model in a + // form param named `model`. + Backbone.emulateJSON = false; + + // Backbone.Events + // ----------------- + + // A module that can be mixed in to *any object* in order to provide it with + // custom events. You may bind with `on` or remove with `off` callback functions + // to an event; trigger`-ing an event fires all callbacks in succession. + // + // var object = {}; + // _.extend(object, Backbone.Events); + // object.on('expand', function(){ alert('expanded'); }); + // object.trigger('expand'); + // + Backbone.Events = { + + // Bind an event, specified by a string name, `ev`, to a `callback` + // function. Passing `"all"` will bind the callback to all events fired. + on: function(events, callback, context) { + var ev; + events = events.split(/\s+/); + var calls = this._callbacks || (this._callbacks = {}); + while (ev = events.shift()) { + // Create an immutable callback list, allowing traversal during + // modification. The tail is an empty object that will always be used + // as the next node. + var list = calls[ev] || (calls[ev] = {}); + var tail = list.tail || (list.tail = list.next = {}); + tail.callback = callback; + tail.context = context; + list.tail = tail.next = {}; + } + return this; + }, + + // Remove one or many callbacks. If `context` is null, removes all callbacks + // with that function. If `callback` is null, removes all callbacks for the + // event. If `ev` is null, removes all bound callbacks for all events. + off: function(events, callback, context) { + var ev, calls, node; + if (!events) { + delete this._callbacks; + } else if (calls = this._callbacks) { + events = events.split(/\s+/); + while (ev = events.shift()) { + node = calls[ev]; + delete calls[ev]; + if (!callback || !node) continue; + // Create a new list, omitting the indicated event/context pairs. + while ((node = node.next) && node.next) { + if (node.callback === callback && + (!context || node.context === context)) continue; + this.on(ev, node.callback, node.context); + } + } + } + return this; + }, + + // Trigger an event, firing all bound callbacks. Callbacks are passed the + // same arguments as `trigger` is, apart from the event name. + // Listening for `"all"` passes the true event name as the first argument. + trigger: function(events) { + var event, node, calls, tail, args, all, rest; + if (!(calls = this._callbacks)) return this; + all = calls['all']; + (events = events.split(/\s+/)).push(null); + // Save references to the current heads & tails. + while (event = events.shift()) { + if (all) events.push({next: all.next, tail: all.tail, event: event}); + if (!(node = calls[event])) continue; + events.push({next: node.next, tail: node.tail}); + } + // Traverse each list, stopping when the saved tail is reached. + rest = slice.call(arguments, 1); + while (node = events.pop()) { + tail = node.tail; + args = node.event ? [node.event].concat(rest) : rest; + while ((node = node.next) !== tail) { + node.callback.apply(node.context || this, args); + } + } + return this; + } + + }; + + // Aliases for backwards compatibility. + Backbone.Events.bind = Backbone.Events.on; + Backbone.Events.unbind = Backbone.Events.off; + + // Backbone.Model + // -------------- + + // Create a new model, with defined attributes. A client id (`cid`) + // is automatically generated and assigned for you. + Backbone.Model = function(attributes, options) { + var defaults; + attributes || (attributes = {}); + if (options && options.parse) attributes = this.parse(attributes); + if (defaults = getValue(this, 'defaults')) { + attributes = _.extend({}, defaults, attributes); + } + if (options && options.collection) this.collection = options.collection; + this.attributes = {}; + this._escapedAttributes = {}; + this.cid = _.uniqueId('c'); + if (!this.set(attributes, {silent: true})) { + throw new Error("Can't create an invalid model"); + } + delete this._changed; + this._previousAttributes = _.clone(this.attributes); + this.initialize.apply(this, arguments); + }; + + // Attach all inheritable methods to the Model prototype. + _.extend(Backbone.Model.prototype, Backbone.Events, { + + // The default name for the JSON `id` attribute is `"id"`. MongoDB and + // CouchDB users may want to set this to `"_id"`. + idAttribute: 'id', + + // Initialize is an empty function by default. Override it with your own + // initialization logic. + initialize: function(){}, + + // Return a copy of the model's `attributes` object. + toJSON: function() { + return _.clone(this.attributes); + }, + + // Get the value of an attribute. + get: function(attr) { + return this.attributes[attr]; + }, + + // Get the HTML-escaped value of an attribute. + escape: function(attr) { + var html; + if (html = this._escapedAttributes[attr]) return html; + var val = this.attributes[attr]; + return this._escapedAttributes[attr] = _.escape(val == null ? '' : '' + val); + }, + + // Returns `true` if the attribute contains a value that is not null + // or undefined. + has: function(attr) { + return this.attributes[attr] != null; + }, + + // Set a hash of model attributes on the object, firing `"change"` unless + // you choose to silence it. + set: function(key, value, options) { + var attrs, attr, val; + if (_.isObject(key) || key == null) { + attrs = key; + options = value; + } else { + attrs = {}; + attrs[key] = value; + } + + // Extract attributes and options. + options || (options = {}); + if (!attrs) return this; + if (attrs instanceof Backbone.Model) attrs = attrs.attributes; + if (options.unset) for (attr in attrs) attrs[attr] = void 0; + + // Run validation. + if (!this._validate(attrs, options)) return false; + + // Check for changes of `id`. + if (this.idAttribute in attrs) this.id = attrs[this.idAttribute]; + + var now = this.attributes; + var escaped = this._escapedAttributes; + var prev = this._previousAttributes || {}; + var alreadySetting = this._setting; + this._changed || (this._changed = {}); + this._setting = true; + + // Update attributes. + for (attr in attrs) { + val = attrs[attr]; + if (!_.isEqual(now[attr], val)) delete escaped[attr]; + options.unset ? delete now[attr] : now[attr] = val; + if (this._changing && !_.isEqual(this._changed[attr], val)) { + this.trigger('change:' + attr, this, val, options); + this._moreChanges = true; + } + delete this._changed[attr]; + if (!_.isEqual(prev[attr], val) || (_.has(now, attr) != _.has(prev, attr))) { + this._changed[attr] = val; + } + } + + // Fire the `"change"` events, if the model has been changed. + if (!alreadySetting) { + if (!options.silent && this.hasChanged()) this.change(options); + this._setting = false; + } + return this; + }, + + // Remove an attribute from the model, firing `"change"` unless you choose + // to silence it. `unset` is a noop if the attribute doesn't exist. + unset: function(attr, options) { + (options || (options = {})).unset = true; + return this.set(attr, null, options); + }, + + // Clear all attributes on the model, firing `"change"` unless you choose + // to silence it. + clear: function(options) { + (options || (options = {})).unset = true; + return this.set(_.clone(this.attributes), options); + }, + + // Fetch the model from the server. If the server's representation of the + // model differs from its current attributes, they will be overriden, + // triggering a `"change"` event. + fetch: function(options) { + options = options ? _.clone(options) : {}; + var model = this; + var success = options.success; + options.success = function(resp, status, xhr) { + if (!model.set(model.parse(resp, xhr), options)) return false; + if (success) success(model, resp); + }; + options.error = Backbone.wrapError(options.error, model, options); + return (this.sync || Backbone.sync).call(this, 'read', this, options); + }, + + // Set a hash of model attributes, and sync the model to the server. + // If the server returns an attributes hash that differs, the model's + // state will be `set` again. + save: function(key, value, options) { + var attrs, current; + if (_.isObject(key) || key == null) { + attrs = key; + options = value; + } else { + attrs = {}; + attrs[key] = value; + } + + options = options ? _.clone(options) : {}; + if (options.wait) current = _.clone(this.attributes); + var silentOptions = _.extend({}, options, {silent: true}); + if (attrs && !this.set(attrs, options.wait ? silentOptions : options)) { + return false; + } + var model = this; + var success = options.success; + options.success = function(resp, status, xhr) { + var serverAttrs = model.parse(resp, xhr); + if (options.wait) serverAttrs = _.extend(attrs || {}, serverAttrs); + if (!model.set(serverAttrs, options)) return false; + if (success) { + success(model, resp); + } else { + model.trigger('sync', model, resp, options); + } + }; + options.error = Backbone.wrapError(options.error, model, options); + var method = this.isNew() ? 'create' : 'update'; + var xhr = (this.sync || Backbone.sync).call(this, method, this, options); + if (options.wait) this.set(current, silentOptions); + return xhr; + }, + + // Destroy this model on the server if it was already persisted. + // Optimistically removes the model from its collection, if it has one. + // If `wait: true` is passed, waits for the server to respond before removal. + destroy: function(options) { + options = options ? _.clone(options) : {}; + var model = this; + var success = options.success; + + var triggerDestroy = function() { + model.trigger('destroy', model, model.collection, options); + }; + + if (this.isNew()) return triggerDestroy(); + options.success = function(resp) { + if (options.wait) triggerDestroy(); + if (success) { + success(model, resp); + } else { + model.trigger('sync', model, resp, options); + } + }; + options.error = Backbone.wrapError(options.error, model, options); + var xhr = (this.sync || Backbone.sync).call(this, 'delete', this, options); + if (!options.wait) triggerDestroy(); + return xhr; + }, + + // Default URL for the model's representation on the server -- if you're + // using Backbone's restful methods, override this to change the endpoint + // that will be called. + url: function() { + var base = getValue(this.collection, 'url') || getValue(this, 'urlRoot') || urlError(); + if (this.isNew()) return base; + return base + (base.charAt(base.length - 1) == '/' ? '' : '/') + encodeURIComponent(this.id); + }, + + // **parse** converts a response into the hash of attributes to be `set` on + // the model. The default implementation is just to pass the response along. + parse: function(resp, xhr) { + return resp; + }, + + // Create a new model with identical attributes to this one. + clone: function() { + return new this.constructor(this.attributes); + }, + + // A model is new if it has never been saved to the server, and lacks an id. + isNew: function() { + return this.id == null; + }, + + // Call this method to manually fire a `"change"` event for this model and + // a `"change:attribute"` event for each changed attribute. + // Calling this will cause all objects observing the model to update. + change: function(options) { + if (this._changing || !this.hasChanged()) return this; + this._changing = true; + this._moreChanges = true; + for (var attr in this._changed) { + this.trigger('change:' + attr, this, this._changed[attr], options); + } + while (this._moreChanges) { + this._moreChanges = false; + this.trigger('change', this, options); + } + this._previousAttributes = _.clone(this.attributes); + delete this._changed; + this._changing = false; + return this; + }, + + // Determine if the model has changed since the last `"change"` event. + // If you specify an attribute name, determine if that attribute has changed. + hasChanged: function(attr) { + if (!arguments.length) return !_.isEmpty(this._changed); + return this._changed && _.has(this._changed, attr); + }, + + // Return an object containing all the attributes that have changed, or + // false if there are no changed attributes. Useful for determining what + // parts of a view need to be updated and/or what attributes need to be + // persisted to the server. Unset attributes will be set to undefined. + // You can also pass an attributes object to diff against the model, + // determining if there *would be* a change. + changedAttributes: function(diff) { + if (!diff) return this.hasChanged() ? _.clone(this._changed) : false; + var val, changed = false, old = this._previousAttributes; + for (var attr in diff) { + if (_.isEqual(old[attr], (val = diff[attr]))) continue; + (changed || (changed = {}))[attr] = val; + } + return changed; + }, + + // Get the previous value of an attribute, recorded at the time the last + // `"change"` event was fired. + previous: function(attr) { + if (!arguments.length || !this._previousAttributes) return null; + return this._previousAttributes[attr]; + }, + + // Get all of the attributes of the model at the time of the previous + // `"change"` event. + previousAttributes: function() { + return _.clone(this._previousAttributes); + }, + + // Check if the model is currently in a valid state. It's only possible to + // get into an *invalid* state if you're using silent changes. + isValid: function() { + return !this.validate(this.attributes); + }, + + // Run validation against a set of incoming attributes, returning `true` + // if all is well. If a specific `error` callback has been passed, + // call that instead of firing the general `"error"` event. + _validate: function(attrs, options) { + if (options.silent || !this.validate) return true; + attrs = _.extend({}, this.attributes, attrs); + var error = this.validate(attrs, options); + if (!error) return true; + if (options && options.error) { + options.error(this, error, options); + } else { + this.trigger('error', this, error, options); + } + return false; + } + + }); + + // Backbone.Collection + // ------------------- + + // Provides a standard collection class for our sets of models, ordered + // or unordered. If a `comparator` is specified, the Collection will maintain + // its models in sort order, as they're added and removed. + Backbone.Collection = function(models, options) { + options || (options = {}); + if (options.comparator) this.comparator = options.comparator; + this._reset(); + this.initialize.apply(this, arguments); + if (models) this.reset(models, {silent: true, parse: options.parse}); + }; + + // Define the Collection's inheritable methods. + _.extend(Backbone.Collection.prototype, Backbone.Events, { + + // The default model for a collection is just a **Backbone.Model**. + // This should be overridden in most cases. + model: Backbone.Model, + + // Initialize is an empty function by default. Override it with your own + // initialization logic. + initialize: function(){}, + + // The JSON representation of a Collection is an array of the + // models' attributes. + toJSON: function() { + return this.map(function(model){ return model.toJSON(); }); + }, + + // Add a model, or list of models to the set. Pass **silent** to avoid + // firing the `add` event for every new model. + add: function(models, options) { + var i, index, length, model, cid, id, cids = {}, ids = {}; + options || (options = {}); + models = _.isArray(models) ? models.slice() : [models]; + + // Begin by turning bare objects into model references, and preventing + // invalid models or duplicate models from being added. + for (i = 0, length = models.length; i < length; i++) { + if (!(model = models[i] = this._prepareModel(models[i], options))) { + throw new Error("Can't add an invalid model to a collection"); + } + if (cids[cid = model.cid] || this._byCid[cid] || + (((id = model.id) != null) && (ids[id] || this._byId[id]))) { + throw new Error("Can't add the same model to a collection twice"); + } + cids[cid] = ids[id] = model; + } + + // Listen to added models' events, and index models for lookup by + // `id` and by `cid`. + for (i = 0; i < length; i++) { + (model = models[i]).on('all', this._onModelEvent, this); + this._byCid[model.cid] = model; + if (model.id != null) this._byId[model.id] = model; + } + + // Insert models into the collection, re-sorting if needed, and triggering + // `add` events unless silenced. + this.length += length; + index = options.at != null ? options.at : this.models.length; + splice.apply(this.models, [index, 0].concat(models)); + if (this.comparator) this.sort({silent: true}); + if (options.silent) return this; + for (i = 0, length = this.models.length; i < length; i++) { + if (!cids[(model = this.models[i]).cid]) continue; + options.index = i; + model.trigger('add', model, this, options); + } + return this; + }, + + // Remove a model, or a list of models from the set. Pass silent to avoid + // firing the `remove` event for every model removed. + remove: function(models, options) { + var i, l, index, model; + options || (options = {}); + models = _.isArray(models) ? models.slice() : [models]; + for (i = 0, l = models.length; i < l; i++) { + model = this.getByCid(models[i]) || this.get(models[i]); + if (!model) continue; + delete this._byId[model.id]; + delete this._byCid[model.cid]; + index = this.indexOf(model); + this.models.splice(index, 1); + this.length--; + if (!options.silent) { + options.index = index; + model.trigger('remove', model, this, options); + } + this._removeReference(model); + } + return this; + }, + + // Get a model from the set by id. + get: function(id) { + if (id == null) return null; + return this._byId[id.id != null ? id.id : id]; + }, + + // Get a model from the set by client id. + getByCid: function(cid) { + return cid && this._byCid[cid.cid || cid]; + }, + + // Get the model at the given index. + at: function(index) { + return this.models[index]; + }, + + // Force the collection to re-sort itself. You don't need to call this under + // normal circumstances, as the set will maintain sort order as each item + // is added. + sort: function(options) { + options || (options = {}); + if (!this.comparator) throw new Error('Cannot sort a set without a comparator'); + var boundComparator = _.bind(this.comparator, this); + if (this.comparator.length == 1) { + this.models = this.sortBy(boundComparator); + } else { + this.models.sort(boundComparator); + } + if (!options.silent) this.trigger('reset', this, options); + return this; + }, + + // Pluck an attribute from each model in the collection. + pluck: function(attr) { + return _.map(this.models, function(model){ return model.get(attr); }); + }, + + // When you have more items than you want to add or remove individually, + // you can reset the entire set with a new list of models, without firing + // any `add` or `remove` events. Fires `reset` when finished. + reset: function(models, options) { + models || (models = []); + options || (options = {}); + for (var i = 0, l = this.models.length; i < l; i++) { + this._removeReference(this.models[i]); + } + this._reset(); + this.add(models, {silent: true, parse: options.parse}); + if (!options.silent) this.trigger('reset', this, options); + return this; + }, + + // Fetch the default set of models for this collection, resetting the + // collection when they arrive. If `add: true` is passed, appends the + // models to the collection instead of resetting. + fetch: function(options) { + options = options ? _.clone(options) : {}; + if (options.parse === undefined) options.parse = true; + var collection = this; + var success = options.success; + options.success = function(resp, status, xhr) { + collection[options.add ? 'add' : 'reset'](collection.parse(resp, xhr), options); + if (success) success(collection, resp); + }; + options.error = Backbone.wrapError(options.error, collection, options); + return (this.sync || Backbone.sync).call(this, 'read', this, options); + }, + + // Create a new instance of a model in this collection. Add the model to the + // collection immediately, unless `wait: true` is passed, in which case we + // wait for the server to agree. + create: function(model, options) { + var coll = this; + options = options ? _.clone(options) : {}; + model = this._prepareModel(model, options); + if (!model) return false; + if (!options.wait) coll.add(model, options); + var success = options.success; + options.success = function(nextModel, resp, xhr) { + if (options.wait) coll.add(nextModel, options); + if (success) { + success(nextModel, resp); + } else { + nextModel.trigger('sync', model, resp, options); + } + }; + model.save(null, options); + return model; + }, + + // **parse** converts a response into a list of models to be added to the + // collection. The default implementation is just to pass it through. + parse: function(resp, xhr) { + return resp; + }, + + // Proxy to _'s chain. Can't be proxied the same way the rest of the + // underscore methods are proxied because it relies on the underscore + // constructor. + chain: function () { + return _(this.models).chain(); + }, + + // Reset all internal state. Called when the collection is reset. + _reset: function(options) { + this.length = 0; + this.models = []; + this._byId = {}; + this._byCid = {}; + }, + + // Prepare a model or hash of attributes to be added to this collection. + _prepareModel: function(model, options) { + if (!(model instanceof Backbone.Model)) { + var attrs = model; + options.collection = this; + model = new this.model(attrs, options); + if (!model._validate(model.attributes, options)) model = false; + } else if (!model.collection) { + model.collection = this; + } + return model; + }, + + // Internal method to remove a model's ties to a collection. + _removeReference: function(model) { + if (this == model.collection) { + delete model.collection; + } + model.off('all', this._onModelEvent, this); + }, + + // Internal method called every time a model in the set fires an event. + // Sets need to update their indexes when models change ids. All other + // events simply proxy through. "add" and "remove" events that originate + // in other collections are ignored. + _onModelEvent: function(ev, model, collection, options) { + if ((ev == 'add' || ev == 'remove') && collection != this) return; + if (ev == 'destroy') { + this.remove(model, options); + } + if (model && ev === 'change:' + model.idAttribute) { + delete this._byId[model.previous(model.idAttribute)]; + this._byId[model.id] = model; + } + this.trigger.apply(this, arguments); + } + + }); + + // Underscore methods that we want to implement on the Collection. + var methods = ['forEach', 'each', 'map', 'reduce', 'reduceRight', 'find', + 'detect', 'filter', 'select', 'reject', 'every', 'all', 'some', 'any', + 'include', 'contains', 'invoke', 'max', 'min', 'sortBy', 'sortedIndex', + 'toArray', 'size', 'first', 'initial', 'rest', 'last', 'without', 'indexOf', + 'shuffle', 'lastIndexOf', 'isEmpty', 'groupBy']; + + // Mix in each Underscore method as a proxy to `Collection#models`. + _.each(methods, function(method) { + Backbone.Collection.prototype[method] = function() { + return _[method].apply(_, [this.models].concat(_.toArray(arguments))); + }; + }); + + // Backbone.Router + // ------------------- + + // Routers map faux-URLs to actions, and fire events when routes are + // matched. Creating a new one sets its `routes` hash, if not set statically. + Backbone.Router = function(options) { + options || (options = {}); + if (options.routes) this.routes = options.routes; + this._bindRoutes(); + this.initialize.apply(this, arguments); + }; + + // Cached regular expressions for matching named param parts and splatted + // parts of route strings. + var namedParam = /:\w+/g; + var splatParam = /\*\w+/g; + var escapeRegExp = /[-[\]{}()+?.,\\^$|#\s]/g; + + // Set up all inheritable **Backbone.Router** properties and methods. + _.extend(Backbone.Router.prototype, Backbone.Events, { + + // Initialize is an empty function by default. Override it with your own + // initialization logic. + initialize: function(){}, + + // Manually bind a single named route to a callback. For example: + // + // this.route('search/:query/p:num', 'search', function(query, num) { + // ... + // }); + // + route: function(route, name, callback) { + Backbone.history || (Backbone.history = new Backbone.History); + if (!_.isRegExp(route)) route = this._routeToRegExp(route); + if (!callback) callback = this[name]; + Backbone.history.route(route, _.bind(function(fragment) { + var args = this._extractParameters(route, fragment); + callback && callback.apply(this, args); + this.trigger.apply(this, ['route:' + name].concat(args)); + Backbone.history.trigger('route', this, name, args); + }, this)); + return this; + }, + + // Simple proxy to `Backbone.history` to save a fragment into the history. + navigate: function(fragment, options) { + Backbone.history.navigate(fragment, options); + }, + + // Bind all defined routes to `Backbone.history`. We have to reverse the + // order of the routes here to support behavior where the most general + // routes can be defined at the bottom of the route map. + _bindRoutes: function() { + if (!this.routes) return; + var routes = []; + for (var route in this.routes) { + routes.unshift([route, this.routes[route]]); + } + for (var i = 0, l = routes.length; i < l; i++) { + this.route(routes[i][0], routes[i][1], this[routes[i][1]]); + } + }, + + // Convert a route string into a regular expression, suitable for matching + // against the current location hash. + _routeToRegExp: function(route) { + route = route.replace(escapeRegExp, '\\$&') + .replace(namedParam, '([^\/]+)') + .replace(splatParam, '(.*?)'); + return new RegExp('^' + route + '$'); + }, + + // Given a route, and a URL fragment that it matches, return the array of + // extracted parameters. + _extractParameters: function(route, fragment) { + return route.exec(fragment).slice(1); + } + + }); + + // Backbone.History + // ---------------- + + // Handles cross-browser history management, based on URL fragments. If the + // browser does not support `onhashchange`, falls back to polling. + Backbone.History = function() { + this.handlers = []; + _.bindAll(this, 'checkUrl'); + }; + + // Cached regex for cleaning leading hashes and slashes . + var routeStripper = /^[#\/]/; + + // Cached regex for detecting MSIE. + var isExplorer = /msie [\w.]+/; + + // Has the history handling already been started? + var historyStarted = false; + + // Set up all inheritable **Backbone.History** properties and methods. + _.extend(Backbone.History.prototype, Backbone.Events, { + + // The default interval to poll for hash changes, if necessary, is + // twenty times a second. + interval: 50, + + // Get the cross-browser normalized URL fragment, either from the URL, + // the hash, or the override. + getFragment: function(fragment, forcePushState) { + if (fragment == null) { + if (this._hasPushState || forcePushState) { + fragment = window.location.pathname; + var search = window.location.search; + if (search) fragment += search; + } else { + fragment = window.location.hash; + } + } + fragment = decodeURIComponent(fragment); + if (!fragment.indexOf(this.options.root)) fragment = fragment.substr(this.options.root.length); + return fragment.replace(routeStripper, ''); + }, + + // Start the hash change handling, returning `true` if the current URL matches + // an existing route, and `false` otherwise. + start: function(options) { + + // Figure out the initial configuration. Do we need an iframe? + // Is pushState desired ... is it available? + if (historyStarted) throw new Error("Backbone.history has already been started"); + this.options = _.extend({}, {root: '/'}, this.options, options); + this._wantsHashChange = this.options.hashChange !== false; + this._wantsPushState = !!this.options.pushState; + this._hasPushState = !!(this.options.pushState && window.history && window.history.pushState); + var fragment = this.getFragment(); + var docMode = document.documentMode; + var oldIE = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7)); + if (oldIE) { + this.iframe = $('