Fixing broken build from yesterday
As the very first thing to try, my colleagues said to throw away node_modules with yarn clean
, followed by a
re-run of yarn install
.
Package-lock.json found
warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
Yarn upgraded + node installation
Got a message that yarn was two minor versions behind, installed it with brew, and turned out it also brought in a new version of node that was also installed with brew.
I had two versions of node installed, and the new install wasn’t able to (over)write the symlinks that brew created. So I unlinked node@6 and used brew link –overwrite node to link this latest version.
But which node
still reveals a v8 of node. I also have nvm (node version manager) installed and now wondering
again what the interplay/compatibility is between node installed through brew, and node installed & managed through NVM.
Anyway, the build works again
The initial hint was a good one and now the build works again. I’m continuing with the .po concerns alleviating discussed yesterday.
Dealing with length
Right now, the news on the homepage is not internationalised at all, and also not split off into some configuration. So using that as the demonstrator.
I have escaped the single quote in the last message. And IntelliJ IDEA is also complaining about the unfinished string. Let’s see how I can translate these …
Despite the complaint, it does work flawlessly. In the translation files, you don’t need to deal with new lines, you can simply continue on then next line.
<li>capture and describe digital material using a submission workflow module, or a variety of programmatic
ingest options
</li>
Translating this in .po
msgid "capture and describe digital material using a submission workflow module, "
"or a variety of programmatic ingest options"
msgstr "digitale materialen te vangen en beschrijven, gebruik makend van een invoer werkstroom module, "
"of een variatie aan progammatische invoer mogelijkheden"
Dealing with special characters
Let’s try to put DSpace between double quotes in the welcome message.
2.3.3. Escape sequences is pretty clear on this
Escaping in Angular
In angular, you need to escape the single quotes
<li>distribute an organisation\</li>
You can just leave them as is in the .po and .pot files
msgid "distribute an organisation\'s digital assets over the web through a search and retrieval system"
msgstr "de digitale materialen van \'n organisatie over het web te distribueren "
"dankzij een zoek en terughaal systeem"
Escaping in .po and .pot
In .po and .pot, you need to escape the double quotes
<h1 class="display-3">Welcome to "DSpace"</h1>
msgid "Welcome to \"DSpace\""
msgstr "Welkom in \"DSpace\""
How does the context field/string work exactly ?
TODO tomorrow
Day 98 Plan
Make a demonstrator that uses two exactly the same strings, but uses the context support in .po. Investigate why some message keys were missing from the automated extraction.
Future days - DSpace 7 Angular
- Explore if there’s any opportunity to extend documentation or tests in other parts of the DSpace Angular code.
- UI for enabling/disabling particular languages
- Continue with implementing the actions and the reducer for the language switch.
- Build a feature where users can customize their own language tags, straight from the UI, by switching on some kind of “translator” mode, to do these changes at runtime
- UI for exporting their customized messages
- Angular Universal tutorial based on Tour of Heroes
- Continue where I left off in ng-book
Future days - Analyzer.atmire.com work
- Change String based implementation of error message handling with types and objects, according to Antoine Snyers recent Atmire DevTalk.
- Change string based implementation of the different browse styles to an object, according to Antoine Snyers recent Atmire DevTalk
- Optimize my hideous methods for getItemcount and getRepoCount.
- Re-test the check if we return the right repository to a user who tries to add a new one
- Updating a repository: touch/change the base URL or not?
- Batch ingest: switch to newer add repository methods.
- WCAG testing against the start page to ensure it’s accessible for people who rely on assistive tools.
- Transition from plain CSS to SASS to make it prettier and learn about SASS at the same time
- Instead of the 5 minute cron job, look into a gitlab webhook that executes the update script on prod whenever something is committed to master.
- Add documentation to the methods of the item controller
- Change the back button on the item page with a real link back to the repository analysis, instead of the current history -1 hack.
Future Days - Productivity
- Get my IntelliJ IDEA Shortcuts for comments in order
Future days - Jekyll http://bram-atmire.github.io/ site
- Make it prettier
- explore utteranc.es for adding commenting possibility (thank you Philip)
Future Days - Atmire.com work
Investigate and work on search engine optimization (SEO) for the main atmire.com website. Look into web.dev from google for this (thank you Philip)
Future Days - Learning just for learning
- CSS: Go through the fabulous CSS Diner
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.