diff options
Diffstat (limited to 'Cydia.app')
-rw-r--r-- | Cydia.app/English.lproj/Localizable.strings | 190 | ||||
-rw-r--r-- | Cydia.app/confirm.html | 13 | ||||
-rw-r--r-- | Cydia.app/confirm.js | 16 | ||||
-rw-r--r-- | Cydia.app/error.html | 6 | ||||
-rw-r--r-- | Cydia.app/localize.js | 15 | ||||
-rw-r--r-- | Cydia.app/manage.html | 16 | ||||
-rw-r--r-- | Cydia.app/menes/menes.js | 9 | ||||
-rw-r--r-- | Cydia.app/menes/style.css | 16 | ||||
-rw-r--r-- | Cydia.app/package.html | 46 | ||||
-rw-r--r-- | Cydia.app/package.js | 96 | ||||
-rw-r--r-- | Cydia.app/storage.html | 3 |
11 files changed, 344 insertions, 82 deletions
diff --git a/Cydia.app/English.lproj/Localizable.strings b/Cydia.app/English.lproj/Localizable.strings new file mode 100644 index 0000000..e83bf86 --- /dev/null +++ b/Cydia.app/English.lproj/Localizable.strings @@ -0,0 +1,190 @@ +"ABOUT" = "About"; +"ABOUT_CYDIA" = "About Cydia Installer"; +"ACCEPT_NEW_COPY" = "Accept The New Copy"; +"ADD" = "Add"; +"ADD_ANYWAY" = "Add Anyway"; +"ADD_SOURCE" = "Add Source"; +"ADMINISTRATIVE_INFORMATION" = "Administrative Information"; +"ADVANCED_SEARCH" = "Advanced Search"; +"ALL_PACKAGES" = "All Packages"; +"APPLE" = "Apple"; +"AUTHOR" = "Author"; +"AVAILABLE_UPGRADES" = "Available Upgrades"; +"BROWSER" = "Browser"; +"CANCEL" = "Cancel"; +"CANCEL_CLEAR" = "Cancel and Clear"; +"CANCEL_OPERATION" = "Cancel Operation"; +"CANNOT_COMPLY" = "Cannot Comply"; +"CANNOT_COMPLY_EX" = "The requested modifications cannot be applied due to required dependencies or conflicts that cannot be automatically found or fixed."; +"CANNOT_LOCATE_PACKAGE" = "Cannot Locate Package"; +"CHANGE_PACKAGE_SETTINGS" = "Change Package Settings"; +"CHANGES" = "Changes"; +"CLEAR" = "Clear"; +"CLOSE" = "Close"; +"CLOSE_CYDIA" = "Close Cydia (Restart)"; +"COLON_DELIMITED" = "%@: %@"; +"COMMA_DELIMITED" = "%@, %@"; +"COMING_SOON" = "Coming Soon!"; +"COMPLETE" = "Complete"; +"COMPLETE_UPGRADE" = "Complete Upgrade"; +"CONFIGURATION_UPGRADE" = "Configuration Upgrade"; +"CONFIGURATION_UPGRADE_EX" = "The following file has been changed by both the package maintainer and by you (or for you by a script)."; +"COMMERCIAL_APPLICATIONS" = "Commercial Applications"; +"CONFIRM" = "Confirm"; +"CONSOLE_PACKAGE" = "This is a console package!"; +"CONSOLE_UTILITIES_DAEMONS" = "Console Utilities & Daemons"; +"CONTINUE_QUEUING" = "Continue Queuing"; +"CREDITS" = "Credits"; +"CYDIA_STORE" = "Cydia Store"; +"DETAILS" = "Details"; +"DEVELOPER" = "Developer"; +"DEVELOPER_EX" = "No Filters"; +"DEVELOPER_MAILING_LISTS" = "Developer Mailing Lists"; +"DEVELOPERS_ONLY" = "Developers Only"; +"DISK_FREEING" = "Disk Freeing"; +"DISK_USING" = "Disk Using"; +"DONATE_USING" = "Donate using %@"; +"DONE" = "Done"; +"DOWNGRADE" = "Downgrade"; +"DOWNLOADING" = "Downloading"; +"EDIT" = "Edit"; +"ENTER_APT_URL" = "Enter Cydia/APT URL"; +"ENTERED_BY_USER" = "Entered by User"; +"ERROR" = "Error"; +"ERROR_MESSAGE" = "Error: %@"; +"ESSENTIAL_UPGRADE" = "Essential Upgrade"; +"ESSENTIAL_UPGRADES" = "%d Essential Upgrades"; +"ESSENTIAL_UPGRADE_EX" = "One or more essential packages are currently out of date. If these upgrades are not performed you are likely to encounter errors."; +"EXPANDED_SIZE" = "Expanded Size"; +"EXPERT" = "Expert"; +"FEATURED_PACKAGES" = "Featured Packages"; +"FAQ" = "FAQ"; +"FILES" = "Files"; +"FILES_INSTALLED_TO" = "files installed to %@"; +"FILESYSTEM_CONTENT" = "Filesystem Content"; +"FOLLOW_ON_TWITTER" = "Follow %@ on Twitter"; +"FORCE_REMOVAL" = "Force Removal"; +"FORCIBLY_CLEAR" = "Forcibly Clear"; +"FREE_APPLICATIONS" = "Free Applications"; +"FREE_EXTENSIONS" = "Free Extensions"; +"FREQUENTLY_ASKED_QUESTIONS" = "Frequently Asked Questions"; +"FROM" = "from %@"; +"FROWNY_PANTS" = "Frowny Pants"; +"FUTURE_FEATURE_ROADMAP" = "Future Feature Roadmap"; +"HACKER" = "Hacker"; +"HACKER_EX" = "+ Command Line"; +"HALFINSTALLED_PACKAGE" = "Half-Installed Package"; +"HALFINSTALLED_PACKAGES" = "%d Half-Installed Packages"; +"HALFINSTALLED_PACKAGE_EX" = "When the shell scripts associated with packages fail, they are left in a bad state known as either half-configured or half-installed. These errors don't go away and instead continue to cause issues. These scripts can be deleted and the packages forcibly removed."; +"HOME" = "Home"; +"ID" = "ID"; +"IGNORE_UPGRADES" = "Ignore Upgrades"; +"IGNORED_UPGRADES" = "Ignored Upgrades"; +"ILLEGAL_PACKAGE_IDENTIFIER" = "Illegal Package Identifier"; +"INSTALL" = "Install"; +"INSTALL_BY_SECTION" = "Install by Section"; +"INSTALLED" = "Installed"; +"INSTALLED_BY_PACKAGE" = "Installed by Package"; +"INSTALLED_DETAILS" = "Installed Package"; +"INSTALLED_FILES" = "Installed Files"; +"KEEP_OLD_COPY" = "Keep My Old Copy"; +"LOADING" = "Loading"; +"LOADING_DATA" = "Loading Data"; +"LOCAL" = "Local"; +"LOGIN" = "Login"; +"MAINTAINER" = "Contact"; +"MANAGE" = "Manage"; +"MODIFY" = "Modify"; +"MORE_INFORMATION" = "More Information"; +"NAME" = "Name"; +"NETWORK_ERROR" = "Network Error"; +"NEVER_OR_UNKNOWN" = "Never or Unknown"; +"NEW_AT" = "New at %@"; +"NEW_INSTALL" = "New Install"; +"NO_SECTION" = "(No Section)"; +"NOT_RATED" = "Not Rated"; +"NODE" = "Note"; +"NOT_REPOSITORY" = "Did not Find Repository"; +"NOT_REPOSITORY_EX" = "The indicated repository could not be found. This could be because you are trying to add a legacy Installer repository (these are not supported). Also, this interface is only capable of working with exact repository URLs. If you host a repository and are having issues please contact the author of Cydia with any questions you have."; +"OK" = "OK"; +"OKAY" = "Okay"; +"PACKAGE_CANNOT_BE_FOUND" = "The package %@ cannot be found in your current sources. I might recommend installing more sources."; +"PACKAGE_DAMAGED" = "Package Damaged"; +"PACKAGE_DETAILS" = "Package Details"; +"PACKAGE_QUEUE" = "Package Queue"; +"PACKAGES" = "Packages"; +"PACKAGES_EX" = "View or remove packages you previously installed."; +"PARENTHETICAL" = "%@ (%@)"; +"PASSWORD" = "password"; +"PURGE" = "Purge"; +"Q_D" = "Q'd"; +"QUEUED_FOR" = "Queued for %@"; +"REBOOT_DEVICE" = "Reboot Device"; +"RECENT_CHANGES_UPDATES" = "Recent Changes/Updates"; +"RECOMMENDED_BOOKS" = "Recommended Books"; +"REFRESH" = "Refresh"; +"REINSTALL" = "Reinstall"; +"RELOAD" = "Reload"; +"RELOAD_SPRINGBOARD" = "Reload SpringBoard"; +"RELOADING_DATA" = "Reloading Data"; +"REMOVE" = "Remove"; +"REMOVING_ESSENTIALS" = "Removing Essentials"; +"REMOVING_ESSENTIALS_EX" = "This operation involves the removal of one or more packages that are required for the continued operation of either Cydia or iPhoneOS. If you continue, you may not be able to use Cydia to repair any damage."; +"REPAIRING" = "Repairing"; +"REPOSITORY_SIGNATURE" = "View Repository Signature"; +"REQUEST_ADVERTISING_SPACE" = "Request Advertising Space"; +"REQUIREMENTS_FOR_LISTING" = "Requirements for Listing"; +"RESTART_SPRINGBOARD" = "Restart SpringBoard"; +"RESUBMIT_FORM" = "Are you sure you want to submit this form again?"; +"RESUMING_AT" = "Resuming At"; +"RETURN_TO_CYDIA" = "Return to Cydia"; +"ROLE_EX" = "Not all of the packages available via Cydia are designed to be used by all users. Please categorize yourself so that Cydia can apply helpful filters.\n\nThis choice can be changed from \"Settings\" under the \"Manage\" tab."; +"RUNNING" = "Running"; +"SAFE" = "Safe"; +"SAMPLE" = "Sample"; +"SCREENSHOT" = "Screenshot"; +"SCREENSHOTS" = "Screenshots"; +"SEARCH" = "Search"; +"SEARCH_EX" = "Package Names & Descriptions"; +"SECTION" = "Section"; +"SECTION_VISIBILITY" = "Section Visibility"; +"SECTIONS" = "Sections"; +"SEE_WHAT_CHANGED" = "See What Changed"; +"SETTINGS" = "Settings"; +"SHOW_ALL_CHANGES" = "Show All Changes"; +"SHOW_ALL_CHANGES_EX" = "Changes only shows upgrades to installed packages so as to minimize spam from packagers. Activate this to see upgrades to this package even when it is not installed."; +"SIGNED_PACKAGE" = "This package has been signed."; +"SIMPLE" = "Simple"; +"SLASH_DELIMITED" = "%@ / %@"; +"SOURCE_DETAILS" = "Source Information"; +"SOURCE_WARNING" = "Source Warning"; +"SOURCES" = "Sources"; +"SOURCES_EX" = "List current sources and add custom ones you may know."; +"SPONSOR" = "Sponsor"; +"SPONSORING_PRODUCTS" = "Sponsoring Products"; +"STATISTICS" = "Statistics"; +"STORAGE" = "Storage"; +"STORAGE_EX" = "See how much room you have left for new packages."; +"SUBMIT" = "Submit"; +"SUPPORT_KNOWN_ISSUES" = "Support & Known Issues"; +"TEMPORARY_IGNORE" = "Ignore (Temporary)"; +"THANK YOU" = "Thank You"; +"QUEUE" = "Queue"; +"UNABLE_TO_COMPLY" = "Unable to Comply"; +"UNABLE_TO_COMPLY_EX" = "This operation requires the removal of one or more packages that are required for the continued operation of either Cydia or iPhoneOS. In order to continue and force this operation you will need to be activate the Advanced mode under to continue and force this operation you will need to be activate the Advanced mode under Settings."; +"UNABLE_TO_LOAD" = "Unable to Load"; +"UNKNOWN" = "Unknown"; +"UNSAFE" = "Unsafe"; +"UPDATING_DATABASE" = "Updating Database"; +"UPDATING_SOURCES" = "Updating Sources"; +"UPGRADE" = "Upgrade"; +"UPGRADE_ESSENTIAL" = "Upgrade Essential"; +"USER" = "User"; +"USER_EX" = "Graphical Only"; +"USER_GUIDES" = "User Guides"; +"USERNAME" = "username"; +"VERIFICATION_ERROR" = "Verificatin Error"; +"VERIFYING_URL" = "Verifying URL"; +"VERSION" = "Version"; +"WELCOME_TO_CYDIA" = "Welcome to Cydiaâ„¢"; +"WHO_ARE_YOU" = "Who Are You?"; diff --git a/Cydia.app/confirm.html b/Cydia.app/confirm.html index 4d6566b..3f01c11 100644 --- a/Cydia.app/confirm.html +++ b/Cydia.app/confirm.html @@ -1,28 +1,29 @@ <?xml version="1.0" encoding="UTF-16"?> <html><head> - <title>Confirm</title> + <title localize="CONFIRM"></title> <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="stylesheet" type="text/css" href="menes/style.css"/> <script type="text/javascript" src="menes/menes.js"></script> <script type="text/javascript" src="confirm.js"></script> + <script type="text/javascript" src="localize.js"></script> <base target="_blank"/> </head><body class="pinstripe"> <dialog><panel id="issues"> <fieldset class="issues"> - <div><p><span style="color: red; font-weight: bold">Note:</span> The requested modifications cannot be applied due to required dependencies or conflicts that cannot be automatically found or fixed.</p></div> + <div><p><span style="color: red; font-weight: bold" localize="NOTE"></span>: <span localize="CANNOT_COMPLY_EX"></span></p></div> </fieldset> -<label class="_issues">Statistics</label> +<label class="_issues" localize="STATISTICS"></label> <fieldset class="_issues"> <div class="downloading"><div> - <label>Downloading</label> + <label localize="DOWNLOADING"></label> <label id="downloading"></label> </div></div> <div class="resuming"><div> - <label>Resuming At</label> + <label localize="RESUMING_AT"></label> <label id="resuming"></label> </div></div> @@ -32,7 +33,7 @@ </div></div> </fieldset> -<label>Modifications</label> +<label localize="MODIFICATIONS"></label> <fieldset id="modifications"> </fieldset> diff --git a/Cydia.app/confirm.js b/Cydia.app/confirm.js index 5322af6..bd78c2e 100644 --- a/Cydia.app/confirm.js +++ b/Cydia.app/confirm.js @@ -24,10 +24,10 @@ $(function () { size = size.substr(1); } - $("#disk-key").html(negative ? "Disk Freeing" : "Disk Using"); + $("#disk-key").html(cydia.localize(negative ? "DISK_FREEING" : "DISK_USING")); $("#disk-value").html($.xml(size)); } else for (var i = 0; i != issues.length; ++i) { - document.title = "Cannot Comply"; + document.title = cydia.localize("CANNOT_COMPLY"); $("._issues").remove(); @@ -51,11 +51,11 @@ $(function () { } var keys = [ - "Install", - "Reinstall", - "Upgrade", - "Downgrade", - "Remove" + "INSTALL", + "REINSTALL", + "UPGRADE", + "DOWNGRADE", + "REMOVE" ]; for (var i = 0; i != 5; ++i) { @@ -64,7 +64,7 @@ $(function () { if (length != 0) { $("#modifications").append("<div class=\"clearfix\"><div>" + - "<label>" + $.xml(keys[i]) + "</label>" + + "<label>" + cydia.localize($.xml(keys[i])) + "</label>" + "<label id=\"c" + i + "\"></label>" + "</div></div>"); diff --git a/Cydia.app/error.html b/Cydia.app/error.html index 6a42a52..180fa5c 100644 --- a/Cydia.app/error.html +++ b/Cydia.app/error.html @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-16"?> <html><head> - <title>Network Error</title> + <title localize="NETWORK_ERROR"></title> <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <script type="text/javascript" src="menes/menes.js"></script> + <script type="text/javascript" src="localize.js"></script> <base target="_blank"/> <style> @@ -33,7 +35,7 @@ </style> </head><body><div class="page"> -<div class="title">Unable To Load</div> +<div class="title" localize="UNABLE_TO_LOAD"></div> <div class="error">(<script> document.write(decodeURI(location.search.substring(1))); diff --git a/Cydia.app/localize.js b/Cydia.app/localize.js new file mode 100644 index 0000000..9be82d0 --- /dev/null +++ b/Cydia.app/localize.js @@ -0,0 +1,15 @@ +document.addEventListener("DOMContentLoaded", function () { + var results = document.evaluate("//*[@localize]", document, null, XPathResult.ANY_TYPE, null); + var result, nodes = []; + while (result = results.iterateNext()) + nodes.push(result); + for (var index in nodes) { + var node = nodes[index]; + var key = node.getAttribute('localize'); + var value = cydia.localize(key, node.innerHTML); + if (node.nodeName == 'TITLE') + document.title = value; + else + node.innerHTML = value; + } +}); diff --git a/Cydia.app/manage.html b/Cydia.app/manage.html index 045f18e..5b69279 100644 --- a/Cydia.app/manage.html +++ b/Cydia.app/manage.html @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-16"?> <html><head> - <title>Manage</title> + <title localize="MANAGE"></title> <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> + <script type="text/javascript" src="menes/menes.js"></script> + <script type="text/javascript" src="localize.js"></script> <base target="_blank"/> <style> @@ -81,8 +83,8 @@ <a href="cydia://packages" class="giant-button"> <div class="contents"> <img src="packages.png"/> - <label>Packages</label> - <div>View or remove packages you previously installed.</div> + <label localize="PACKAGES"></label> + <div localize="PACKAGES_EX"></div> </div> <div class="background"></div> @@ -91,8 +93,8 @@ <a href="cydia://sources" class="giant-button"> <div class="contents"> <img src="sources.png"/> - <label>Sources</label> - <div>List current sources and add custom ones you may know.</div> + <label localize="SOURCES"></label> + <div localize="SOURCES_EX"></div> </div> <div class="background"></div> @@ -101,8 +103,8 @@ <a href="cydia://storage" class="giant-button"> <div class="contents"> <img src="storage.png"/> - <label>Storage</label> - <div>See how much room you have left for new packages.</div> + <label localize="STORAGE"></label> + <div localize="STORAGE_EX"></div> </div> <div class="background"></div> diff --git a/Cydia.app/menes/menes.js b/Cydia.app/menes/menes.js index 098f377..dc210bb 100644 --- a/Cydia.app/menes/menes.js +++ b/Cydia.app/menes/menes.js @@ -287,6 +287,15 @@ $.inject({ } }, + height: { + get: function (node) { + return node.height; + }, + set: function (node, value) { + node.height = value; + } + }, + html: { get: function (node) { return node.innerHTML; diff --git a/Cydia.app/menes/style.css b/Cydia.app/menes/style.css index 61a53df..d558e83 100644 --- a/Cydia.app/menes/style.css +++ b/Cydia.app/menes/style.css @@ -252,14 +252,18 @@ panel > label { panel > fieldset > a, panel > fieldset > div, panel > fieldset > textarea { - border-bottom: 1px solid #999999; + border-top: 1px solid #999999; +} + +.deleted { + display: none; } -panel > fieldset > a.left:nth-last-child(2), -panel > fieldset > a:last-child, -panel > fieldset > div:last-child, -panel > fieldset > textarea:last-child { - border-bottom: 0; +panel > fieldset > a.right:nth-child(2), +panel > fieldset > a:first-child, +panel > fieldset > div:first-child, +panel > fieldset > textarea:first-child { + border-top: 0; } list > fieldset > a, diff --git a/Cydia.app/package.html b/Cydia.app/package.html index 8a79b82..56de1e5 100644 --- a/Cydia.app/package.html +++ b/Cydia.app/package.html @@ -1,14 +1,15 @@ <?xml version="1.0" encoding="UTF-16"?> <html><head> - <title>Details</title> + <title localize="DETAILS"></title> <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"/> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> <link rel="stylesheet" type="text/css" href="menes/style.css"/> <script type="text/javascript" src="menes/menes.js"></script> <script type="text/javascript" src="package.js"></script> + <script type="text/javascript" src="localize.js"></script> <base target="_blank"/> - <script type="text/javascript"> + <!--script type="text/javascript"> var count = -1; var loaded = function() { if (count++ != 0) @@ -21,12 +22,15 @@ $(".description").css("display", "block"); $(".depiction").remove(); } - </script> + </script--> <style> .flip-180 { -webkit-backface-visibility: hidden; -webkit-transform: rotateY(180deg); + } + + #icon.flip-180 { -webkit-transition-duration: 2s; -webkit-transition-property: transform; } @@ -204,7 +208,7 @@ <a class="rating" id="rating-href"> <div id="rating-none"> - <div class="star"></div><div class="text">Not Rated</div> + <div class="star"></div><div class="text" localize="NOT_RATED"></div> </div><div id="rating-done"> <div class="fore" id="rating-value"></div> <div class="back"></div> @@ -217,7 +221,7 @@ <fieldset class="mode"> <a> <img class="icon" id="mode-src"/><div> - <label>Package Queue</label> + <label localize="PACKAGE_QUEUE"></label> <label id="mode"></label> </div></a> </fieldset> @@ -225,12 +229,12 @@ <fieldset id="actions"> <a id="settings"> <img class="icon" src="settings.png"/><div> - <label>Change Package Settings</label> + <label localize="CHANGE_PACKAGE_SETTINGS"></label> </div></a> <a id="author-href" class="author" target="_popup"> <img id="author-icon" class="icon" src="email.png"/><div> - <label>Author</label> + <label localize="AUTHOR"></label> <label id="author"></label> </div></a> @@ -241,7 +245,7 @@ <a class="console" href="http://cydia.saurik.com/purpose/console/"> <img class="icon" src="console.png"/><div> - <label>This is a console package!</label> + <label localize="CONSOLE_PACKAGE"></label> </div></a> <a id="application"> @@ -298,69 +302,69 @@ <fieldset class="description homepage"> <a class="homepage" id="homepage-href"> <img class="icon" src="web.png"/><div> - <label>More Information</label> + <label localize="MORE_INFORMATION"></label> </div></a> </fieldset> -<label class="installed">Installed Package</label> +<label class="installed" localize="INSTALLED_DETAILS"></label> <fieldset class="installed"> <div> <img class="icon" src="version.png"/><div> - <label>Version</label> + <label localize="VERSION"></label> <label id="installed"></label> </div></div> <a id="files-href"> <img class="icon" src="filesystem.png"/><div> - <label>Filesystem Content</label> + <label localize="FILESYSTEM_CONTENT"></label> </div></a> </fieldset> -<label>Package Details</label> +<label localize="PACKAGE_DETAILS"></label> <fieldset> <div> <img class="icon" src="id.png"/><div> - <label>ID</label> + <label localize="ID"></label> <label id="id"></label> </div></div> <div class="section"> <img id="section-src" class="icon"/><div> - <label>Section</label> + <label localize="SECTION"></label> <label id="section"></label> </div></div> <div class="size"> <img class="icon" src="expanded.png"/><div> - <label>Expanded Size</label> + <label localize="EXPANDED_SIZE"></label> <label id="size"></label> </div></div> <a id="maintainer-href" class="maintainer" target="_popup"> <img id="maintainer-icon" class="icon" src="email.png"/><div> - <label>Contact</label> + <label localize="MAINTAINER"></label> <label id="maintainer"></label> </div></a> <a id="sponsor-href" class="sponsor"> <img class="icon" src="web.png"/><div> - <label>Sponsor</label> + <label localize="SPONSOR"></label> <label id="sponsor"></label> </div></a> <!--a class="trusted" id="trusted"> <img class="icon" src="trusted.png"><div> - <label>View Repository Signature</label> + <label localize="REPOSITORY_SIGNATURE"></label> </div></a--> <div class="trusted"> <img class="icon" src="trusted.png"><div> <label> </label> - <label>This package has been signed.</label> + <label localize="SIGNED_PACKAGE"></label> </div></div> </fieldset> -<label class="source">Source Information</label> +<label class="source" localize="SOURCE_DETAILS"></label> <fieldset class="source"> <div> <img class="icon" id="source-src"/><div> diff --git a/Cydia.app/package.js b/Cydia.app/package.js index 1a78a8b..418e44a 100644 --- a/Cydia.app/package.js +++ b/Cydia.app/package.js @@ -49,7 +49,10 @@ swap_ = function (on, off, time) { }; }; -$(function () { +var special_ = function () { + if (package == null) + return; + var id = package.id; var idc = encodeURIComponent(id); var name = package.name; @@ -71,19 +74,17 @@ $(function () { value = eval(value); if (typeof value.rating == "undefined") - $(".rating").remove(); + $(".rating").addClass("deleted"); else { - $("#rating-load").remove(); + $("#rating-load").addClass("deleted"); $("#rating-href").href(value.reviews); var none = $("#rating-none"); var done = $("#rating-done"); if (value.rating == null) { - done.remove(); none.css("display", "block"); } else { - none.remove(); done.css("display", "block"); $("#rating-value").css('width', 16 * value.rating); @@ -100,14 +101,14 @@ $(function () { thumb.css("background-image", 'url("' + value.icon + '")'); setTimeout(function () { - icon.css("display", "none"); + icon.addClass("deleted"); thumb[0].className = 'flip-0'; }, 2000); } }, failure: function (status) { - $(".rating").remove(); + $(".rating").addClass("deleted"); } }); @@ -115,33 +116,34 @@ $(function () { var mode = package.mode; if (mode == null) - $(".mode").remove(); + $(".mode").addClass("deleted"); else { - $("#mode").html(mode); + $("#mode").html(cydia.localize(mode)); $("#mode-src").src("Modes/" + mode + ".png"); } var warnings = package.warnings; var length = warnings == null ? 0 : warnings.length; if (length == 0) - $(".warnings").remove(); + $(".warnings").addClass("deleted"); else { var parent = $("#warnings"); var child = $("#warning"); - child.remove(); for (var i = 0; i != length; ++i) { var clone = child.clone(true); + clone.addClass("inserted"); parent.append(clone); clone.xpath("./div/label").html($.xml(warnings[i])); } + + child.addClass("deleted"); } var applications = package.applications; var length = applications == null ? 0 : applications.length; var child = $("#application"); - child.remove(); /*if (length != 0) { var parent = $("#actions"); @@ -156,21 +158,23 @@ $(function () { } }*/ + child.addClass("deleted"); + var commercial = package.hasTag('cydia::commercial'); if (!commercial) - $(".commercial").remove(); + $(".commercial").addClass("deleted"); var _console = package.hasTag('purpose::console'); if (!_console) - $(".console").remove(); + $(".console").addClass("deleted"); var author = package.author; if (author == null) - $(".author").remove(); + $(".author").addClass("deleted"); else { space("#author", author.name, 160); if (author.address == null) - $("#author-icon").remove(); + $("#author-icon").addClass("deleted"); else { var support = package.support; if (support == null) @@ -184,7 +188,7 @@ $(function () { /*var store = commercial; if (!store) - $(".activation").remove(); + $(".activation").addClass("deleted"); else { var activation = api + 'activation/' + idc; $("#activation-src").src(activation); @@ -192,9 +196,9 @@ $(function () { var depiction = package.depiction; if (depiction == null) - $(".depiction").remove(); + $(".depiction").addClass("deleted"); else { - $(".description").css("display", "none"); + $(".description").addClass("deleted"); $("#depiction-src").src(depiction); } @@ -207,13 +211,13 @@ $(function () { var homepage = package.homepage; if (homepage == null) - $(".homepage").remove(); + $(".homepage").addClass("deleted"); else $("#homepage-href").href(homepage); var installed = package.installed; if (installed == null) - $(".installed").remove(); + $(".installed").addClass("deleted"); else { $("#installed").html(installed); $("#files-href").href("cydia://files/" + idc); @@ -223,7 +227,7 @@ $(function () { var section = package.section; if (section == null) - $(".section").remove(); + $(".section").addClass("deleted"); else { $("#section-src").src("cydia://section-icon/" + encodeURIComponent(section)); $("#section").html(section); @@ -231,24 +235,24 @@ $(function () { var size = package.size; if (size == 0) - $(".size").remove(); + $(".size").addClass("deleted"); else $("#size").html(size / 1024 + " kB"); var maintainer = package.maintainer; if (maintainer == null) - $(".maintainer").remove(); + $(".maintainer").addClass("deleted"); else { space("#maintainer", maintainer.name, 153); if (maintainer.address == null) - $("#maintainer-icon").remove(); + $("#maintainer-icon").addClass("deleted"); else $("#maintainer-href").href("mailto:" + maintainer.address + "?subject=" + regarding("M")); } var sponsor = package.sponsor; if (sponsor == null) - $(".sponsor").remove(); + $(".sponsor").addClass("deleted"); else { space("#sponsor", sponsor.name, 152); $("#sponsor-href").href(sponsor.address); @@ -256,8 +260,8 @@ $(function () { var source = package.source; if (source == null) { - $(".source").remove(); - $(".trusted").remove(); + $(".source").addClass("deleted"); + $(".trusted").addClass("deleted"); } else { var host = source.host; @@ -267,12 +271,42 @@ $(function () { if (source.trusted) $("#trusted").href("cydia://package-signature/" + idc); else - $(".trusted").remove(); + $(".trusted").addClass("deleted"); var description = source.description; if (description == null) - $(".source-description").remove(); + $(".source-description").addClass("deleted"); else $("#source-description").html(description); } -}); +}; + +$(special_); + +var special = function () { + $(".deleted").removeClass("deleted"); + $(".inserted").remove(); + + $("#icon")[0].className = 'flip-0'; + $("#thumb")[0].className = 'flip-180'; + + /* XXX: this could be better */ + $("#rating-none").css("display", "none"); + $("#rating-done").css("display", "none"); + + var depiction = $("#depiction-src"); + + depiction[0].outerHTML = '<iframe' + + ' class="depiction"' + + ' id="depiction-src"' + + ' frameborder="0"' + + ' width="320"' + + ' height="0"' + + ' target="_top"' + + ' onload_="loaded()"' + + '></iframe>'; + + special_(); +}; + +cydia.setSpecial(special); diff --git a/Cydia.app/storage.html b/Cydia.app/storage.html index e2347b9..033ff4f 100644 --- a/Cydia.app/storage.html +++ b/Cydia.app/storage.html @@ -1,10 +1,11 @@ <?xml version="1.0" encoding="UTF-16"?> <html><head> - <title>Storage</title> + <title localize="STORAGE"></title> <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0"/> <link rel="stylesheet" type="text/css" href="menes/style.css"/> <script type="text/javascript" src="menes/menes.js"></script> <script type="text/javascript" src="storage.js"></script> + <script type="text/javascript" src="localize.js"></script> <base target="_blank"/> <style> |