Bug 1419601 - Indonesian Bahasa Indonesia "id" builds have broken new tab pages. r=k88hudson
authorEd Lee <edilee@mozilla.com>
Tue, 21 Nov 2017 15:37:58 -0800
changeset 393209 20bc0a541fe995396877c89f00f1203fcc882321
parent 393208 cc77ce263b1fcfcf37892ca81b50bc659ff14f4f
child 393210 d9bbfb2a7e42820b4866d6b3a0e64d11979cc198
push id97613
push usershindli@mozilla.com
push dateWed, 22 Nov 2017 22:22:51 +0000
treeherdermozilla-inbound@c01eab6a9e80 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersk88hudson
bugs1419601
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1419601 - Indonesian Bahasa Indonesia "id" builds have broken new tab pages. r=k88hudson MozReview-Commit-ID: Clu62Xs8wnK
.gitignore
browser/components/newtab/tests/browser/browser_packaged_as_locales.js
browser/extensions/activity-stream/prerendered/locales/id/activity-stream-prerendered.html
browser/extensions/activity-stream/prerendered/locales/id/activity-stream-strings.js
browser/extensions/activity-stream/prerendered/locales/id/activity-stream.html
--- a/.gitignore
+++ b/.gitignore
@@ -2,17 +2,17 @@
 
 # Filenames that should be ignored wherever they appear
 *~
 *.pyc
 *.pyo
 TAGS
 tags
 ID
-!/browser/extensions/activity-stream/prerendered/id/
+!/browser/extensions/activity-stream/prerendered/locales/id/
 !/browser/extensions/screenshots/webextension/_locales/id/
 .DS_Store*
 *.pdb
 *.egg-info
 
 # Vim swap files.
 .*.sw[a-z]
 
--- a/browser/components/newtab/tests/browser/browser_packaged_as_locales.js
+++ b/browser/components/newtab/tests/browser/browser_packaged_as_locales.js
@@ -33,20 +33,27 @@ add_task(async function test_default_loc
   const url = await getUrlForLocale("de-UNKNOWN");
   Assert.equal(url, DEFAULT_URL.replace("en-US", "de"));
 });
 
 /**
  * Tests that all activity stream packaged locales can be referenced / accessed
  */
 add_task(async function test_all_packaged_locales() {
+  let gotID = false;
   const listing = await (await fetch("resource://activity-stream/prerendered/")).text();
   for (const line of listing.split("\n").slice(2)) {
     const [file, , , type] = line.split(" ").slice(1);
     if (type === "DIRECTORY") {
       const locale = file.replace("/", "");
       if (locale !== "static") {
         const url = await getUrlForLocale(locale);
         Assert[locale === "en-US" ? "equal" : "notEqual"](url, DEFAULT_URL, `can reference "${locale}" files`);
+
+        // Specially remember if we saw an ID locale packaged as it can be
+        // easily ignored by source control, e.g., .gitignore
+        gotID |= locale === "id";
       }
     }
   }
+
+  Assert.ok(gotID, `"id" locale packaged and not ignored`);
 });
new file mode 100644
--- /dev/null
+++ b/browser/extensions/activity-stream/prerendered/locales/id/activity-stream-prerendered.html
@@ -0,0 +1,37 @@
+<!doctype html>
+<html lang="id" dir="ltr">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="Content-Security-Policy-Report-Only" content="script-src 'unsafe-inline'; img-src http: https: data: blob:; style-src 'unsafe-inline'; child-src 'none'; object-src 'none'; report-uri https://tiles.services.mozilla.com/v4/links/activity-stream/csp">
+    <link rel="icon" type="image/png" id="favicon" href="chrome://branding/content/icon32.png"/>
+    <link rel="stylesheet" href="chrome://browser/content/contentSearchUI.css" />
+    <link rel="stylesheet" href="resource://activity-stream/css/activity-stream.css" />
+  </head>
+  <body class="activity-stream">
+    <div id="root"><div class="outer-wrapper fixed-to-top" data-reactroot="" data-reactid="1" data-react-checksum="-19032572"><main data-reactid="2"><div class="search-wrapper" data-reactid="3"><label for="newtab-search-text" class="search-label" data-reactid="4"><span class="sr-only" data-reactid="5"><span data-reactid="6">Cari di Web</span></span></label><input type="search" id="newtab-search-text" maxlength="256" placeholder="Cari di Web" title="Cari di Web" data-reactid="7"/><button id="searchSubmit" class="search-button" title="Cari" data-reactid="8"><span class="sr-only" data-reactid="9"><span data-reactid="10">Cari</span></span></button></div><div class="body-wrapper" data-reactid="11"><section class="collapsible-section top-sites animation-enabled" data-reactid="12"><div class="section-top-bar" data-reactid="13"><h3 class="section-title" data-reactid="14"><span class="click-target" data-reactid="15"><span class="icon icon-small-spacer icon-topsites" data-reactid="16"></span><span data-reactid="17">Situs Teratas</span><span class="icon icon-arrowhead-down" data-reactid="18"></span></span></h3><span class="section-info-option" data-reactid="19"><img class="info-option-icon" title="Info" aria-haspopup="true" aria-controls="info-option" aria-expanded="false" role="note" tabindex="0" data-reactid="20"/><div class="info-option" data-reactid="21"><div class="info-option-header" role="heading" data-reactid="22"><span data-reactid="23">Situs Teratas</span></div><p class="info-option-body" data-reactid="24"><span data-reactid="25">Mengakses situs web yang paling sering Anda kunjungi.</span></p><div class="info-option-manage" data-reactid="26"><button data-reactid="27"><span data-reactid="28">Preferensi Tab Baru</span></button></div></div></span></div><div class="section-body" data-reactid="29"><ul class="top-sites-list" data-reactid="30"><li class="top-site-outer placeholder" data-reactid="31"><a data-reactid="32"><div class="tile" aria-hidden="true" data-reactid="33"><div class="screenshot" style="background-image:none;" data-reactid="34"></div></div><div class="title " data-reactid="35"><span dir="auto" data-reactid="36"></span></div></a></li><li class="top-site-outer placeholder" data-reactid="37"><a data-reactid="38"><div class="tile" aria-hidden="true" data-reactid="39"><div class="screenshot" style="background-image:none;" data-reactid="40"></div></div><div class="title " data-reactid="41"><span dir="auto" data-reactid="42"></span></div></a></li><li class="top-site-outer placeholder" data-reactid="43"><a data-reactid="44"><div class="tile" aria-hidden="true" data-reactid="45"><div class="screenshot" style="background-image:none;" data-reactid="46"></div></div><div class="title " data-reactid="47"><span dir="auto" data-reactid="48"></span></div></a></li><li class="top-site-outer placeholder" data-reactid="49"><a data-reactid="50"><div class="tile" aria-hidden="true" data-reactid="51"><div class="screenshot" style="background-image:none;" data-reactid="52"></div></div><div class="title " data-reactid="53"><span dir="auto" data-reactid="54"></span></div></a></li><li class="top-site-outer placeholder" data-reactid="55"><a data-reactid="56"><div class="tile" aria-hidden="true" data-reactid="57"><div class="screenshot" style="background-image:none;" data-reactid="58"></div></div><div class="title " data-reactid="59"><span dir="auto" data-reactid="60"></span></div></a></li><li class="top-site-outer placeholder" data-reactid="61"><a data-reactid="62"><div class="tile" aria-hidden="true" data-reactid="63"><div class="screenshot" style="background-image:none;" data-reactid="64"></div></div><div class="title " data-reactid="65"><span dir="auto" data-reactid="66"></span></div></a></li></ul><div class="edit-topsites-wrapper" data-reactid="67"><div class="edit-topsites-button" data-reactid="68"><button class="edit" title="Ubahsuai bagian Situs Teratas Anda" data-reactid="69"><span data-reactid="70">Sunting</span></button></div></div></div></section><div class="sections-list" data-reactid="71"><section class="collapsible-section section animation-enabled" data-reactid="72"><div class="section-top-bar" data-reactid="73"><h3 class="section-title" data-reactid="74"><span class="click-target" data-reactid="75"><span class="icon icon-small-spacer icon-pocket" data-reactid="76"></span><span data-reactid="77">Disarankan oleh Pocket</span><span class="icon icon-arrowhead-down" data-reactid="78"></span></span></h3></div><div class="section-body" data-reactid="79"><ul class="section-list" style="padding:0;" data-reactid="80"><li class="card-outer placeholder" data-reactid="81"><a data-reactid="82"><div class="card" data-reactid="83"><div class="card-details no-image" data-reactid="84"><div class="card-text no-context no-description no-host-name no-image" data-reactid="85"><h4 class="card-title" dir="auto" data-reactid="86"></h4><p class="card-description" dir="auto" data-reactid="87"></p></div><div class="card-context" data-reactid="88"></div></div></div></a></li><li class="card-outer placeholder" data-reactid="89"><a data-reactid="90"><div class="card" data-reactid="91"><div class="card-details no-image" data-reactid="92"><div class="card-text no-context no-description no-host-name no-image" data-reactid="93"><h4 class="card-title" dir="auto" data-reactid="94"></h4><p class="card-description" dir="auto" data-reactid="95"></p></div><div class="card-context" data-reactid="96"></div></div></div></a></li><li class="card-outer placeholder" data-reactid="97"><a data-reactid="98"><div class="card" data-reactid="99"><div class="card-details no-image" data-reactid="100"><div class="card-text no-context no-description no-host-name no-image" data-reactid="101"><h4 class="card-title" dir="auto" data-reactid="102"></h4><p class="card-description" dir="auto" data-reactid="103"></p></div><div class="card-context" data-reactid="104"></div></div></div></a></li></ul><div class="topic" data-reactid="105"><span data-reactid="106"><span data-reactid="107">Topik Populer:</span></span><ul data-reactid="108"></ul></div></div></section><section class="collapsible-section section animation-enabled" data-reactid="109"><div class="section-top-bar" data-reactid="110"><h3 class="section-title" data-reactid="111"><span class="click-target" data-reactid="112"><span class="icon icon-small-spacer icon-highlights" data-reactid="113"></span><span data-reactid="114">Sorotan</span><span class="icon icon-arrowhead-down" data-reactid="115"></span></span></h3></div><div class="section-body" data-reactid="116"><ul class="section-list" style="padding:0;" data-reactid="117"><li class="card-outer placeholder" data-reactid="118"><a data-reactid="119"><div class="card" data-reactid="120"><div class="card-details no-image" data-reactid="121"><div class="card-text no-context no-description no-host-name no-image" data-reactid="122"><h4 class="card-title" dir="auto" data-reactid="123"></h4><p class="card-description" dir="auto" data-reactid="124"></p></div><div class="card-context" data-reactid="125"></div></div></div></a></li><li class="card-outer placeholder" data-reactid="126"><a data-reactid="127"><div class="card" data-reactid="128"><div class="card-details no-image" data-reactid="129"><div class="card-text no-context no-description no-host-name no-image" data-reactid="130"><h4 class="card-title" dir="auto" data-reactid="131"></h4><p class="card-description" dir="auto" data-reactid="132"></p></div><div class="card-context" data-reactid="133"></div></div></div></a></li><li class="card-outer placeholder" data-reactid="134"><a data-reactid="135"><div class="card" data-reactid="136"><div class="card-details no-image" data-reactid="137"><div class="card-text no-context no-description no-host-name no-image" data-reactid="138"><h4 class="card-title" dir="auto" data-reactid="139"></h4><p class="card-description" dir="auto" data-reactid="140"></p></div><div class="card-context" data-reactid="141"></div></div></div></a></li></ul></div></section></div></div><!-- react-empty: 142 --></main></div></div>
+    <div id="snippets-container">
+      <div id="snippets"></div>
+    </div>
+    <script>
+// Don't directly load the following scripts as part of html to let the page
+// finish loading to render the content sooner.
+for (const src of [
+  "resource://activity-stream/prerendered/static/activity-stream-initial-state.js",
+  "chrome://browser/content/contentSearchUI.js",
+  "resource://activity-stream/vendor/react.js",
+  "resource://activity-stream/vendor/react-dom.js",
+  "resource://activity-stream/vendor/react-intl.js",
+  "resource://activity-stream/vendor/redux.js",
+  "resource://activity-stream/vendor/react-redux.js",
+  "resource://activity-stream/prerendered/id/activity-stream-strings.js",
+  "resource://activity-stream/data/content/activity-stream.bundle.js"
+]) {
+  // These dynamically inserted scripts by default are async, but we need them
+  // to load in the desired order (i.e., bundle last).
+  const script = document.body.appendChild(document.createElement("script"));
+  script.async = false;
+  script.src = src;
+}
+    </script>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/extensions/activity-stream/prerendered/locales/id/activity-stream-strings.js
@@ -0,0 +1,98 @@
+// Note - this is a generated file.
+window.gActivityStreamStrings = {
+  "newtab_page_title": "Tab Baru",
+  "default_label_loading": "Memuat…",
+  "header_top_sites": "Situs Teratas",
+  "header_stories": "Cerita Utama",
+  "header_highlights": "Sorotan",
+  "header_visit_again": "Kunjungi Lagi",
+  "header_bookmarks": "Markah Terbaru",
+  "header_recommended_by": "Disarankan oleh {provider}",
+  "header_bookmarks_placeholder": "Anda belum memiliki markah.",
+  "header_stories_from": "dari",
+  "type_label_visited": "Dikunjungi",
+  "type_label_bookmarked": "Dimarkahi",
+  "type_label_synced": "Disinkronkan dari perangkat lain",
+  "type_label_recommended": "Trending",
+  "type_label_open": "Buka",
+  "type_label_topic": "Topik",
+  "type_label_now": "Sekarang",
+  "menu_action_bookmark": "Markah",
+  "menu_action_remove_bookmark": "Hapus Markah",
+  "menu_action_copy_address": "Salin Alamat",
+  "menu_action_email_link": "Emailkan Tautan…",
+  "menu_action_open_new_window": "Buka di Jendela Baru",
+  "menu_action_open_private_window": "Buka di Jendela Penjelajahan Pribadi Baru",
+  "menu_action_dismiss": "Tutup",
+  "menu_action_delete": "Hapus dari Riwayat",
+  "menu_action_pin": "Semat",
+  "menu_action_unpin": "Lepas",
+  "confirm_history_delete_p1": "Yakin ingin menghapus setiap bagian dari laman ini dari riwayat Anda?",
+  "confirm_history_delete_notice_p2": "Tindakan ini tidak bisa diurungkan.",
+  "menu_action_save_to_pocket": "Simpan ke Pocket",
+  "search_for_something_with": "Cari {search_term} lewat:",
+  "search_button": "Cari",
+  "search_header": "Pencarian {search_engine_name}",
+  "search_web_placeholder": "Cari di Web",
+  "search_settings": "Ubah Pengaturan Pencarian",
+  "section_info_option": "Info",
+  "section_info_send_feedback": "Kirim Umpan Balik",
+  "section_info_privacy_notice": "Kebijakan Privasi",
+  "section_disclaimer_topstories": "The most interesting stories on the web, selected based on what you read. From Pocket, now part of Mozilla.",
+  "section_disclaimer_topstories_linktext": "Learn how it works.",
+  "section_disclaimer_topstories_buttontext": "Okay, got it",
+  "welcome_title": "Selamat datang di tab baru",
+  "welcome_body": "Firefox akan menggunakan ruang ini untuk menampilkan markah, artikel, video, dan laman yang baru-baru ini dikunjungi, yang paling relevan agar Anda bisa kembali mengunjunginya dengan mudah.",
+  "welcome_label": "Mengidentifikasi Sorotan Anda",
+  "time_label_less_than_minute": "<1 mnt",
+  "time_label_minute": "{number} mnt",
+  "time_label_hour": "{number} jam",
+  "time_label_day": "{number} hr",
+  "settings_pane_button_label": "Ubahsuai laman Tab Baru Anda",
+  "settings_pane_header": "Preferensi Tab Baru",
+  "settings_pane_body2": "Pilih apa yang Anda lihat di halaman ini.",
+  "settings_pane_search_header": "Pencarian",
+  "settings_pane_search_body": "Cari Web dari tab baru Anda.",
+  "settings_pane_topsites_header": "Situs Teratas",
+  "settings_pane_topsites_body": "Mengakses situs web yang paling sering Anda kunjungi.",
+  "settings_pane_topsites_options_showmore": "Tampilkan dua baris",
+  "settings_pane_bookmarks_header": "Markah Terbaru",
+  "settings_pane_bookmarks_body": "Markah Anda dibuat di lokasi yang praktis.",
+  "settings_pane_visit_again_header": "Kunjungi Lagi",
+  "settings_pane_visit_again_body": "Firefox akan menunjukkan bagian dari riwayat penjelajahan yang mungkin ingin Anda ingat atau kunjungi lagi.",
+  "settings_pane_highlights_header": "Sorotan",
+  "settings_pane_highlights_body2": "Temukan jalan kembali ke hal menarik yang baru saja Anda kunjungi atau dimarkah.",
+  "settings_pane_highlights_options_bookmarks": "Markah",
+  "settings_pane_highlights_options_visited": "Situs Terkunjungi",
+  "settings_pane_snippets_header": "Catatan Kecil",
+  "settings_pane_snippets_body": "Baca info pendek terbaru dari Mozilla tentang Firefox, budaya internet dan beberapa meme acak.",
+  "settings_pane_done_button": "Selesai",
+  "settings_pane_topstories_options_sponsored": "Show Sponsored Stories",
+  "edit_topsites_button_text": "Sunting",
+  "edit_topsites_button_label": "Ubahsuai bagian Situs Teratas Anda",
+  "edit_topsites_showmore_button": "Tampilkan lainnya",
+  "edit_topsites_showless_button": "Tampilkan lebih sedikit",
+  "edit_topsites_done_button": "Selesai",
+  "edit_topsites_pin_button": "Sematkan situs ini",
+  "edit_topsites_unpin_button": "Lepaskan situs ini",
+  "edit_topsites_edit_button": "Sunting situs ini",
+  "edit_topsites_dismiss_button": "Abaikan situs ini",
+  "edit_topsites_add_button": "Tambah",
+  "topsites_form_add_header": "Situs Pilihan Baru",
+  "topsites_form_edit_header": "Ubah Situs Pilihan",
+  "topsites_form_title_placeholder": "Masukkan judul",
+  "topsites_form_url_placeholder": "Ketik atau tempel URL",
+  "topsites_form_add_button": "Tambah",
+  "topsites_form_save_button": "Simpan",
+  "topsites_form_cancel_button": "Batalkan",
+  "topsites_form_url_validation": "URL valid diperlukan",
+  "pocket_read_more": "Topik Populer:",
+  "pocket_read_even_more": "Lihat Cerita Lainnya",
+  "pocket_feedback_header": "Yang terbaik dari Web, dikurasi lebih dari 25 juta orang.",
+  "pocket_description": "Temukan konten berkualitas tinggi yang mungkin Anda lewatkan dengan bantuan Pocket, yang sekarang menjadi bagian dari Mozilla.",
+  "highlights_empty_state": "Mulai menjelajah, dan kami akan menampilkan beberapa artikel bagus, video, dan halaman lain yang baru saja Anda kunjungi atau termarkah di sini.",
+  "topstories_empty_state": "Maaf Anda tercegat. Periksa lagi nanti untuk lebih banyak cerita terbaik dari {provider}. Tidak mau menunggu? Pilih topik populer untuk menemukan lebih banyak cerita hebat dari seluruh web.",
+  "manual_migration_explanation2": "Coba Firefox dengan markah, riwayat, dan sandi dari peramban lain.",
+  "manual_migration_cancel_button": "Tidak, Terima kasih",
+  "manual_migration_import_button": "Impor Sekarang"
+};
new file mode 100644
--- /dev/null
+++ b/browser/extensions/activity-stream/prerendered/locales/id/activity-stream.html
@@ -0,0 +1,36 @@
+<!doctype html>
+<html lang="id" dir="ltr">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="Content-Security-Policy-Report-Only" content="script-src 'unsafe-inline'; img-src http: https: data: blob:; style-src 'unsafe-inline'; child-src 'none'; object-src 'none'; report-uri https://tiles.services.mozilla.com/v4/links/activity-stream/csp">
+    <link rel="icon" type="image/png" id="favicon" href="chrome://branding/content/icon32.png"/>
+    <link rel="stylesheet" href="chrome://browser/content/contentSearchUI.css" />
+    <link rel="stylesheet" href="resource://activity-stream/css/activity-stream.css" />
+  </head>
+  <body class="activity-stream">
+    <div id="root"></div>
+    <div id="snippets-container">
+      <div id="snippets"></div>
+    </div>
+    <script>
+// Don't directly load the following scripts as part of html to let the page
+// finish loading to render the content sooner.
+for (const src of [
+  "chrome://browser/content/contentSearchUI.js",
+  "resource://activity-stream/vendor/react.js",
+  "resource://activity-stream/vendor/react-dom.js",
+  "resource://activity-stream/vendor/react-intl.js",
+  "resource://activity-stream/vendor/redux.js",
+  "resource://activity-stream/vendor/react-redux.js",
+  "resource://activity-stream/prerendered/id/activity-stream-strings.js",
+  "resource://activity-stream/data/content/activity-stream.bundle.js"
+]) {
+  // These dynamically inserted scripts by default are async, but we need them
+  // to load in the desired order (i.e., bundle last).
+  const script = document.body.appendChild(document.createElement("script"));
+  script.async = false;
+  script.src = src;
+}
+    </script>
+  </body>
+</html>