Skip to content

Commit

Permalink
Update gen_keyboard_overlay.py according to the change of the grd file.
Browse files Browse the repository at this point in the history
BUG=142381
TEST=Check the script works properly


Review URL: https://chromiumcodereview.appspot.com/11066082

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161014 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
mazda@chromium.org committed Oct 10, 2012
1 parent b256057 commit f08238b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions chrome/app/chromeos_strings.grdp
Original file line number Diff line number Diff line change
Expand Up @@ -2595,6 +2595,7 @@ Battery full
<message name="IDS_KEYBOARD_OVERLAY_INSTRUCTIONS_HIDE" desc="The instruction for hiding the keyboard overlay.">
Type Ctrl+Alt+/ or Escape to hide
</message>
<!-- BEGIN GENERATED KEYBOARD OVERLAY STRINGS -->
<message name="IDS_KEYBOARD_OVERLAY_ACTIVATE_LAST_LAUNCHER_ITEM" desc="The text in the keyboard overlay to explain the shortcut (Open the last launcher item).">
Activate last launcher item
</message>
Expand Down Expand Up @@ -2910,6 +2911,7 @@ Battery full
<message name="IDS_KEYBOARD_OVERLAY_ZOOM_OUT" desc="The text in the keyboard overlay to explain the shortcut.">
Zoom out
</message>
<!-- END GENERATED KEYBOARD OVERLAY STRINGS -->
<if expr="lang == 'ja'">
<message name="IDS_STATUSBAR_IME_JAPANESE_IME_STATUS_HIRAGANA" desc="In the language menu button, this shows a character set in use is set to Hiragana.">
Hiragana
Expand Down
13 changes: 6 additions & 7 deletions tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@
CC_OUTDIR = 'chrome/browser/ui/webui/chromeos'
CC_FILENAME = 'keyboard_overlay_ui.cc'
GRD_OUTDIR = 'chrome/app'
GRD_FILENAME = 'generated_resources.grd'
GRD_FILENAME = 'chromeos_strings.grdp'
JS_OUTDIR = 'chrome/browser/resources/chromeos'
JS_FILENAME = 'keyboard_overlay_data.js'
CC_START = r'IDS_KEYBOARD_OVERLAY_INSTRUCTIONS_HIDE },'
CC_END = r'};'
GRD_START = """Escape to hide
</message>"""
GRD_END = r' </if>'
GRD_START = r' <!-- BEGIN GENERATED KEYBOARD OVERLAY STRINGS -->'
GRD_END = r' <!-- END GENERATED KEYBOARD OVERLAY STRINGS -->'

LABEL_MAP = {
'glyph_arrow_down': 'down',
Expand Down Expand Up @@ -162,9 +161,9 @@
""")

# A snippet for grd file
GRD_SNIPPET_TEMPLATE=""" <message name="%s" desc="%s">
%s
</message>
GRD_SNIPPET_TEMPLATE=""" <message name="%s" desc="%s">
%s
</message>
"""

# A snippet for C++ file
Expand Down

0 comments on commit f08238b

Please sign in to comment.