Skip to content

Localization #2195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Dec 11, 2017
Merged
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
7e075f5
localization routine and tests
alexcjohnson Dec 6, 2017
9a9de77
remove zsmooth that doesn't apply to contourcarpet
alexcjohnson Dec 6, 2017
d859de5
wrap all displayed strings in localize
alexcjohnson Dec 6, 2017
7d057e5
task to collect translation keys and verify syntax
alexcjohnson Dec 6, 2017
8a5eeec
looser placeholder check in titles
alexcjohnson Dec 7, 2017
03dcb5d
lint
alexcjohnson Dec 7, 2017
bf2c6db
move colons into the translations
alexcjohnson Dec 7, 2017
04ed6f0
set default locale to en-US and build this into the library
alexcjohnson Dec 8, 2017
0f8520e
turn log level 1 on by default and move zsmooth messages to logs
alexcjohnson Dec 8, 2017
5d6f267
take <br> out of notifier messages
alexcjohnson Dec 8, 2017
97c0898
include file & line number with translation keys
alexcjohnson Dec 8, 2017
daf0884
disable logging in image server
alexcjohnson Dec 8, 2017
4b48038
convert locales to json, only en(US)? in bundles, and build all local…
alexcjohnson Dec 8, 2017
4b8f980
move geo missing id warn -> log
alexcjohnson Dec 8, 2017
1275661
convert locales back into js instead of json
alexcjohnson Dec 8, 2017
fc03cce
change "unable to bind..." warning to a log
alexcjohnson Dec 8, 2017
cb2f00c
fix command test for warn -> log
alexcjohnson Dec 8, 2017
97821e9
tweak a few of the string literals for consistency
alexcjohnson Dec 8, 2017
e80ec91
fix sankey test and clean log messages from other tests
alexcjohnson Dec 8, 2017
8b9e7d8
remove invalid data from geo_choropleth-text.json
alexcjohnson Dec 8, 2017
6029f94
update finance test for lowercase labels
alexcjohnson Dec 8, 2017
9708b56
update select_test for choropleth mock change
alexcjohnson Dec 9, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/image/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
<!-- this index file gets copied in to the image server docker -->
<script type="text/javascript" src="../plotly.js/dist/extras/mathjax/MathJax.js?config=TeX-AMS-MML_SVG"></script>
<script type="text/javascript" src="../plotly.js/build/plotly.js" charset="utf-8"></script>
<script type="text/javascript">
Plotly.setPlotConfig({logging: 0});
</script>
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@etpinard I added this so geo_choropleth-text would render with no console logs (which trip the image server to throw an error). That way the image server keeps the same definition of "error" as it had before. I'm kind of inclined though to either:

  1. Downgrade the Location with id *** does not have a matching topojson feature at this resolution. message from a Lib.warn to a Lib.log, or
  2. Remove the offending ids from that mock. It's a lot though: ARB, BHR, CEB, CSS, EAP, EAS, ECA, ECS, EMU, EUU, FCS, HIC, HKG, HPC, LAC, LCN, LDC, LIC, LMC, LMY, MEA, MIC, MLT, MNA, NAC, NOC, OEC, OED, OSS, SAS, SGP, SSA, SSF, SST, UMC, WLD

Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about both?

Downgrade the Location with id *** does not have a matching topojson feature at this resolution. message from a Lib.warn to a Lib.log,

Yes, that should certainly be Lib.log 👌

Remove the offending ids from that mock. It's a lot though: ARB, BHR, CEB, CSS, EAP, EAS, ECA, ECS, EMU, EUU, FCS, HIC, HKG, HPC, LAC, LCN, LDC, LIC, LMC, LMY, MEA, MIC, MLT, MNA, NAC, NOC, OEC, OED, OSS, SAS, SGP, SSA, SSF, SST, UMC, WLD

I'd vote for removing the offending ids from the mock, but adding a jasmine test spying on Lib.log (if not done already). This part here could be done in a separate PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alright, did both.

  • missing location downgraded to Lib.log 4b8f980 (we have tests of these messages, modified in that commit)
  • removed offending ids anyway 8b9e7d8

<script type="text/javascript" src="../plotly.js/dist/plotly-geo-assets.js" charset="utf-8"></script>
<script type="text/javascript" src="./main.js"></script>
</body>
Expand Down