As decided on previous week, I proceeded to write code for downloading the hyphenation-dictionaries.
Identified and reported as the following bugs
Bug 1276587
Bug 1276588
Bug 1276589
This week I worked on the Bug 1276589 - Consider adding hyphenation dictionaries to static catalog
Thanks to my mentor - Sebastian, before uploading the hyphenation dictionaries to Kinto Server,he uploaded the hyphenation dictionaries to “people.mozilla.org” for coding and testing purposes.
Uploaded files
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_af.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_bg.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_ca.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_cy.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_da.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_de-1901.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_de-1996.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_de-CH.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_en_US.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_eo.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_es.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_et.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_fi.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_fr.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_gl.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_hr.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_hsb.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_hu.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_ia.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_is.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_it.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_kmr.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_la.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_lt.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_mn.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_nb.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_nl.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_nn.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_pl.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_pt.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_ru.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_sh.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_sl.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_sv.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_tr.dic.gz
https://people.mozilla.org/~skaspari/dlc/hyphenation/hyph_uk.dic.gz
For all the above mentioned files, I found the MD5 Hash of the file name and set it as ID. Also found the SHA256 Checksum of the compressed version and uncompressed version of the dictionary. We use the checksum to make sure that the downloaded content is not tampered with. After finding all the necessary details, the static catalog is created. The following is the code snippet for the content builder - hyph_en_US.dic.
new DownloadContentBuilder()
.setId("f0dbf86d-9826-1546-65cf-48ec52b4d556")
.setLocation("~skaspari/dlc/hyphenation/hyph_en_US.dic.gz")
.setFilename("hyph_en_US.dic")
.setChecksum("546b4c007d82b3bc9b3a691a3048eaae86741a162cd4e64a41fdebe147e5e473")
.setDownloadChecksum("285f40e6f88a58070f7d69a299fdaa4164ea82d468b645c5716e6b08d4bddba4")
.setSize(106063)
.setKind("hyphenation-dictionary")
.setType("asset-archive")
.build()
After uploading the file to Kinto, this bug should be revisted and change the filenames and locations. I will be proceeding to use the created static catalog to download the dictionaries in the next week.