Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(220)

Issue 10804036: Extensions Docs Server: Internationalized samples (Closed)

Created:
8 years, 5 months ago by cduvall
Modified:
8 years, 5 months ago
CC:
chromium-reviews, Aaron Boodman, mihaip-chromium-reviews_chromium.org, clintstaley, chebert
Visibility:
Public.

Description

Extensions Docs Server: Internationalized samples The samples page can now handle names and descriptions of the form '__MSG_...', and the locale is chosen based on the Accept-Languages HTTP header. BUG=131095 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=148370

Patch Set 1 : #

Total comments: 14

Patch Set 2 : SamplesDataSource.Factory #

Total comments: 21

Patch Set 3 : fixes #

Patch Set 4 : handlebar #

Total comments: 9

Patch Set 5 : Everything but encodings #

Patch Set 6 : encodings #

Total comments: 7

Patch Set 7 : Move logic into file_system #

Unified diffs Side-by-side diffs Delta from patch set Stats (+174 lines, -106 lines) Patch
M chrome/common/extensions/docs/server2/echo_handler.py View 1 2 3 4 2 chunks +5 lines, -9 lines 0 comments Download
M chrome/common/extensions/docs/server2/file_system.py View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
M chrome/common/extensions/docs/server2/file_system_cache.py View 1 2 3 chunks +3 lines, -5 lines 0 comments Download
M chrome/common/extensions/docs/server2/intro_data_source.py View 1 2 3 4 5 1 chunk +7 lines, -10 lines 0 comments Download
M chrome/common/extensions/docs/server2/local_file_system.py View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/common/extensions/docs/server2/local_file_system_test.py View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/memcache_file_system_test.py View 1 2 3 4 1 chunk +4 lines, -6 lines 0 comments Download
M chrome/common/extensions/docs/server2/samples_data_source.py View 1 2 3 4 5 2 chunks +125 lines, -59 lines 0 comments Download
M chrome/common/extensions/docs/server2/static/css/site.css View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/subversion_file_system.py View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/common/extensions/docs/server2/subversion_file_system_test.py View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/common/extensions/docs/server2/template_data_source.py View 1 2 3 4 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/common/extensions/docs/server2/template_data_source_test.py View 1 2 3 4 1 chunk +5 lines, -2 lines 0 comments Download
M chrome/common/extensions/docs/server2/templates/articles/about_apps.html View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 14 (0 generated)
cduvall
This requires that Handlebar uses unicode() instead of str() to convert data. Try setting your ...
8 years, 5 months ago (2012-07-19 21:44:12 UTC) #1
not at google - send to devlin
https://chromiumcodereview.appspot.com/10804036/diff/2001/chrome/common/extensions/docs/server2/samples_data_source.py File chrome/common/extensions/docs/server2/samples_data_source.py (right): https://chromiumcodereview.appspot.com/10804036/diff/2001/chrome/common/extensions/docs/server2/samples_data_source.py#newcode8 chrome/common/extensions/docs/server2/samples_data_source.py:8: class SamplesDataSource(object): See comment in template_data_source... this needs a ...
8 years, 5 months ago (2012-07-20 01:28:21 UTC) #2
cduvall
https://chromiumcodereview.appspot.com/10804036/diff/2001/chrome/common/extensions/docs/server2/samples_data_source.py File chrome/common/extensions/docs/server2/samples_data_source.py (right): https://chromiumcodereview.appspot.com/10804036/diff/2001/chrome/common/extensions/docs/server2/samples_data_source.py#newcode8 chrome/common/extensions/docs/server2/samples_data_source.py:8: class SamplesDataSource(object): On 2012/07/20 01:28:21, kalman wrote: > See ...
8 years, 5 months ago (2012-07-20 19:40:50 UTC) #3
not at google - send to devlin
Seeing the samples there, in French... kinda surreal, and very funny. In a good way. ...
8 years, 5 months ago (2012-07-23 13:25:34 UTC) #4
cduvall
https://chromiumcodereview.appspot.com/10804036/diff/10001/chrome/common/extensions/docs/server2/file_system.py File chrome/common/extensions/docs/server2/file_system.py (right): https://chromiumcodereview.appspot.com/10804036/diff/10001/chrome/common/extensions/docs/server2/file_system.py#newcode21 chrome/common/extensions/docs/server2/file_system.py:21: def ReadSingleFile(self, path): On 2012/07/23 13:25:37, kalman wrote: > ...
8 years, 5 months ago (2012-07-23 18:10:37 UTC) #5
cduvall
On 2012/07/23 13:25:34, kalman wrote: > Seeing the samples there, in French... kinda surreal, and ...
8 years, 5 months ago (2012-07-23 19:39:41 UTC) #6
cduvall
https://chromiumcodereview.appspot.com/10804036/diff/2005/third_party/handlebar/handlebar.py File third_party/handlebar/handlebar.py (right): https://chromiumcodereview.appspot.com/10804036/diff/2005/third_party/handlebar/handlebar.py#newcode595 third_party/handlebar/handlebar.py:595: self.source = unicode(template, 'utf-8') This fix makes it render ...
8 years, 5 months ago (2012-07-23 21:04:20 UTC) #7
not at google - send to devlin
what you have lg, though there will presumably be a bit more work to get ...
8 years, 5 months ago (2012-07-24 01:23:30 UTC) #8
cduvall
This isn't handling encodings yet. I'm still researching the best way to handle that. http://codereview.chromium.org/10804036/diff/2005/chrome/common/extensions/docs/server2/samples_data_source.py ...
8 years, 5 months ago (2012-07-24 21:22:46 UTC) #9
not at google - send to devlin
Cool. lmk when encodings are working.
8 years, 5 months ago (2012-07-24 23:49:12 UTC) #10
cduvall
This is what I have for encodings. I went for the try-utf8-and-if-that-doesn't-work-use-latin1 approach. I think ...
8 years, 5 months ago (2012-07-25 01:04:37 UTC) #11
not at google - send to devlin
lgtm, let's submit this. http://codereview.chromium.org/10804036/diff/28002/chrome/common/extensions/docs/server2/intro_data_source.py File chrome/common/extensions/docs/server2/intro_data_source.py (right): http://codereview.chromium.org/10804036/diff/28002/chrome/common/extensions/docs/server2/intro_data_source.py#newcode50 chrome/common/extensions/docs/server2/intro_data_source.py:50: self.page_title += data see previous ...
8 years, 5 months ago (2012-07-25 01:44:14 UTC) #12
cduvall
Just responding to the comments, I'll commit tomorrow morning. http://codereview.chromium.org/10804036/diff/28002/chrome/common/extensions/docs/server2/intro_data_source.py File chrome/common/extensions/docs/server2/intro_data_source.py (right): http://codereview.chromium.org/10804036/diff/28002/chrome/common/extensions/docs/server2/intro_data_source.py#newcode50 chrome/common/extensions/docs/server2/intro_data_source.py:50: ...
8 years, 5 months ago (2012-07-25 03:19:25 UTC) #13
cduvall
8 years, 5 months ago (2012-07-25 18:21:33 UTC) #14
http://codereview.chromium.org/10804036/diff/28002/chrome/common/extensions/d...
File chrome/common/extensions/docs/server2/static/css/samples.css (right):

http://codereview.chromium.org/10804036/diff/28002/chrome/common/extensions/d...
chrome/common/extensions/docs/server2/static/css/samples.css:37: min-height:
700px;
On 2012/07/25 03:19:26, cduvall wrote:
> On 2012/07/25 01:44:14, kalman wrote:
> > why? this kind of stuff assumes things about screen sizes. what does it
> achieve?
> 
> I did this so the footer text doesn't come up into the sidebar when there are
no
> samples showing. I can take this out, and we can deal with minor formatting
> things like that later though.

Used float left like you said in your email.

http://codereview.chromium.org/10804036/diff/28002/chrome/common/extensions/d...
File chrome/common/extensions/docs/server2/subversion_file_system.py (right):

http://codereview.chromium.org/10804036/diff/28002/chrome/common/extensions/d...
chrome/common/extensions/docs/server2/subversion_file_system.py:49: if
os.path.splitext(path)[-1] in ['.js', '.html', '.json']:
On 2012/07/25 01:44:14, kalman wrote:
> This is the same code as in LocalFileSystem. Pull into FileSystem?

Done.

Powered by Google App Engine
This is Rietveld 408576698