Last Comment Bug 995960 - Hide l10n missing keys during make
: Hide l10n missing keys during make
Status: RESOLVED FIXED
:
Product: Firefox OS
Classification: Client Software
Component: Gaia::L10n (show other bugs)
: unspecified
: x86 Mac OS X
-- normal (vote)
: 2.0 S1 (9may)
Assigned To: Zibi Braniecki [:gandalf][:zibi]
:
:
Mentors:
Depends on:
Blocks: dale-being-happy
  Show dependency treegraph
 
Reported: 2014-04-14 06:04 PDT by Dale Harvey (:daleharvey)
Modified: 2014-04-17 10:57 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
fixed


Attachments
patch (1.62 KB, patch)
2014-04-15 12:29 PDT, Zibi Braniecki [:gandalf][:zibi]
stas: review+
Details | Diff | Splinter Review
pull request (46 bytes, text/x-github-pull-request)
2014-04-16 19:06 PDT, Zibi Braniecki [:gandalf][:zibi]
no flags Details | Review | Splinter Review

Description User image Dale Harvey (:daleharvey) 2014-04-14 06:04:42 PDT
This is extremely chatty and makes it hard to see errors during the build, we will need some type of flag to enable them for when its important for the person building to see whats missing, but by default there should be less of them

What will work for the l10n devs?
Comment 1 User image Anthony Ricaud (:rik) 2014-04-14 06:37:02 PDT
Isn't it important for every developer to see those errors? We shouldn't have missing keys.
Comment 2 User image Dale Harvey (:daleharvey) 2014-04-14 06:51:49 PDT
I meant missing translations sorry, for example

/build_stage/system/index.html: [l10n] [ar]: 144 missing compared to en-US: brandShortName, browserBrandShortName, browserBrandFullName, help, skip, asyncpanzoom, asyncpanzoomOff, enableScreenReaderSteps, disableScreenReaderSteps, no-recent-apps, deny, dontshare-geolocation, share-geolocation, dontshare-audio-capture, share-audio-capture, dontshare-video-capture, share-video-capture, dontshare-media-capture, share-media-capture, device-front, device-back, more-info, hide-info, size-unknown, author-unknown, kB, continue, setup, ime-addkeyboards, softwareHomeButton, server-not-found, server-not-found-error, network-error-launching, network-error-in-app, unable-to-connect, check-settings, tap-to-check-settings, transfer-confirmation-title, transfer-confirmation-description, byteUnit-KB, transfer-has-started-title, transfer-has-started-description, transferReport-title, transferReport-description, cannotGetStorageState, sdcard-not-exist2, microphone-is-on, camera-is-on, media-is-on, multiSIMpinTitle, system-alert, cb-channel, icc-message-title, icc-confirmCall-defaultmessage, icc-alertMessage-defaultmessage, icc-confirmMessage-defaultmessage, icc-inputbox-title, emergency-callback-mode, emergency-callback-message, cdma-record-info, ime-switching-title, ime-switching-tip, layout-selection, shrinking-tip, download_started, download_stopped, download_downloading, download_succeeded, download_failed, download_text_by_default, download_downloading_text_2, search-or-enter-address, noSIMCardInHotspot, time_am, time_pm, perm-geolocation-more-info, perm-video-capture, perm-video-capture-appRequest, perm-video-capture-webRequest, perm-audio-capture, perm-audio-capture-appRequest, perm-audio-capture-webRequest, perm-media-capture, perm-media-capture-appRequest, perm-media-capture-webRequest, stopped_download_title, stopped_download_message, stopped_download_left_button, stopped_download_right_button, failed_download_title, failed_download_message, failed_download_left_button, failed_download_right_button, stop_download_title, stop_download_message, stop_download_left_button, stop_download_right_button, delete_download_title, delete_download_message, delete_download_left_button, delete_download_right_button, delete_all_download_title, delete_all_download_left_button, delete_all_download_right_button, delete_all_download_message, unsupported_file_type_download_title, unsupported_file_type_download_message, unsupported_file_type_download_left_button, unsupported_file_type_download_right_button, file_not_found_download_title, file_not_found_download_message, file_not_found_download_right_button, unmounted_sdcard_2_download_title, unmounted_sdcard_2_download_message, unmounted_sdcard_2_download_right_button, no_provider_download_title, no_provider_download_message, no_provider_download_right_button, no_memory_download_title, no_memory_download_message, no_memory_download_right_button, no_sdcard_found_2_download_title, no_sdcard_found_2_download_message, no_sdcard_found_2_download_right_button, file_open_error_download_title, file_open_error_download_message, file_open_error_download_left_button, file_open_error_download_right_button, restart_download_error, no-downloads, percentage, partialResult, summary, download-stopped, download-failed, open_downloaded_file, share_downloaded_file, wallpaper_downloaded_file, ringtone_downloaded_file, cancel_downloaded_file, voicemailNoNumberTitle, voicemailNoNumberText, voicemailNoNumberSettings, voicemailNoNumberCancel
Comment 3 User image Zibi Braniecki [:gandalf][:zibi] 2014-04-14 11:13:10 PDT
Yeah, we should basically only report it when LOCALE_BASEDIR is set to report missing entities on real localizations, not the mock ones.

Also, this will go away once we land bug 900182.
Comment 4 User image Zibi Braniecki [:gandalf][:zibi] 2014-04-15 12:29:24 PDT
Created attachment 8407055 [details] [diff] [review]
patch

This patch just turns off debugging unless LOCALE_BASEDIR is set
Comment 5 User image Staś Małolepszy :stas 2014-04-16 16:37:45 PDT
Comment on attachment 8407055 [details] [diff] [review]
patch

Review of attachment 8407055 [details] [diff] [review]:
-----------------------------------------------------------------

::: build/l10n.js
@@ +15,5 @@
>      requiresInlineLocale = false;
>  
> +    if (debug) {
> +      DEBUG = true;
> +    }

Maybe just do | DEBUG = !!debug | ?  Up to you.

::: build/webapp-optimize.js
@@ +586,4 @@
>      // since l10n.js was read before the document was created, we need to
>      // explicitly initialize it again via mozL10n.bootstrap, which looks for
>      // *.ini links in the HTML and sets up the localization context
> +    var debugL10n = config.LOCALE_BASEDIR ? true : false;

Maybe be a bit more specific here and test if LOCALE_BASEDIR is not an empty string instead of testing for truthiness?
Comment 6 User image Zibi Braniecki [:gandalf][:zibi] 2014-04-16 19:05:59 PDT
(In reply to Staś Małolepszy :stas from comment #5)
> Comment on attachment 8407055 [details] [diff] [review]
> patch
> 
> Review of attachment 8407055 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> ::: build/l10n.js
> @@ +15,5 @@
> >      requiresInlineLocale = false;
> >  
> > +    if (debug) {
> > +      DEBUG = true;
> > +    }
> 
> Maybe just do | DEBUG = !!debug | ?  Up to you.


I prefer to leave it to l10n.js. In the future we may want to separate our DEBUG from not reporting buildtime messages.

> ::: build/webapp-optimize.js
> @@ +586,4 @@
> >      // since l10n.js was read before the document was created, we need to
> >      // explicitly initialize it again via mozL10n.bootstrap, which looks for
> >      // *.ini links in the HTML and sets up the localization context
> > +    var debugL10n = config.LOCALE_BASEDIR ? true : false;
> 
> Maybe be a bit more specific here and test if LOCALE_BASEDIR is not an empty
> string instead of testing for truthiness?

Added to pull request.
Comment 7 User image Zibi Braniecki [:gandalf][:zibi] 2014-04-16 19:06:55 PDT
Created attachment 8407953 [details] [review]
pull request
Comment 8 User image Ryan VanderMeulen [:RyanVM] 2014-04-17 06:08:17 PDT
Master: https://github.com/mozilla-b2g/gaia/commit/37989fe20c07d3043d0e6cdcef1f0be01dd81222
Comment 9 User image Zibi Braniecki [:gandalf][:zibi] 2014-04-17 10:57:29 PDT
pushed to l20n.js@gaia repo https://github.com/l20n/l20n.js/commit/f6f5d2065e351ac92f7a2f9603cc4ec930be38e6

Note You need to log in before you can comment on or make changes to this bug.