Bram's Dev Blog

home

100 Days of Code Day 96 - Po concerns

06 Dec 2018

Using the English string instead of the message key

In the Github issue covering the transition to the .po format, helix84 made the point that the community using .po normally doesn’t any abstract message keys/ids. Instead, the English message gets into the source code and serves as the message key. If the contents of two keys are identical, but the use is different, a “context” field gets added. It’s actually the combo of context + message that has to be unique.

When talking this through with my colleagues over lunch, this idea was not totally shot down, but a few concerns were voiced:

So in order to alleviate these concerns, I thought I’d build prototypes/tests for each of these.

Escaping of special characters

Did not get to this yet, see lower

Merging with Angular 6 latest master code

Before I started, I merged master back into my feature branch and now I can’t run ‘yarn run watch’ anymore:

/Users/bram/Development/IdeaProjects/dspace-angular-2018/src/dspace-angular/node_modules/webpack-cli/bin/cli.js:244
				throw err;
				^

Error: Cannot find module 'uglifyjs-webpack-plugin'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)

Because this dependency doesn’t appear in the package.json file on master, I’m a little reluctant to add it just in order to resolve this, so I’ll poke my colleagues for some advice here.

Day 97 Plan

Continue with the experiments of replacing message keys with actual English messages, to serve as the keys going forward. Investigate why some message keys were missing from the automated extraction.

Future days - DSpace 7 Angular

Future days - Analyzer.atmire.com work

Future Days - Productivity

Future days - Jekyll http://bram-atmire.github.io/ site

Future Days - Atmire.com work

Investigate and work on search engine optimization (SEO) for the main atmire.com website.

Future Days - Learning just for learning

Sustainability challenge - Finish before Christmas

If I continue like October, I could hit day 68 by end of October and day 98 by end of November.