Frontend United keynote
Keynoted at Frontend United in The Netherlands about our work on Drupal's web services APIs and our work toward a JavaScript-driven Drupal administration interface. Great event with lots of positive energy!
© Christoph Breidert
Import translations on profile or module installation
Let's say you have a custom module and you want to attach translation files to it. You want to import the translation files after installation or after you have updated the .po translation files. Also make sure that the Interface Translation (locale) core module is installed.
Use a folder named translations inside the module where the language files like de.po or fr.po can be found. To load the translations you have to insert the following lines into your example_module.info.yml:
'interface translation project': example_module
'interface translation server pattern': modules/custom/example_module/translations/%language.po
Note: more details about the interface translation properties can be found here.
To update your translations use the following Drush commands:
drush locale-check && drush locale-update && drush cr
To update existent translations you should take a look at the settings page (/admin/config/regional/translate/settings). You can use local translation files only or overwrite any existing translation.
A May Full of Drupal Commerce Releases
May was one of our most productive months to date. It was full of releases for the core Commerce modules, our standalone PHP libraries, and essential contributed modules that all work together to comprise Drupal Commerce. While I outlined the highlights in the roadmap issue on drupal.org, these wins are worth sharing more broadly to keep the rest of the Drupal community in the loop.
The biggest release of the month was Drupal Commerce 2.7, which included new features for currency formatting, address form configuration, and stored payment methods. It also fixed a handful of bugs that unblocked other module releases and updated core in response to improvements in our libraries and dependent modules.
We've long discussed how our standalone PHP libraries are exporting expertise off the Drupal island. Addressing and Internationalization, which have each been downloaded over one million times, are our two shining stars. We rolled new releases for each of them in May, improving even further Drupal Commerce's ability to solve the hardest parts of address entry / validation / formatting and currency localization. Refer to the price formatting change record from the 2.7 release to see how the new API is more flexible and performant as a result.
eSignatures with HelloSign and Drupal 8
Previously, I wrote a bit about the HelloSign eSignature platform and how it can be integrated into a Drupal 7 website. As promised, a Drupal 8 version of the integration is now available and ready for use on cutting-edge websites everywhere. But this new version is much more than a one-to-one upgrade of the original module— we've leveraged some of Drupal 8's great new features to make using HelloSign with your site even easier than it was before. Here are just some of the highlights of the new release:
![](http://web.archive.org./web/20180602185407im_/https://track.hubspot.com/__ptq.gif?a=3790044&k=14&r=https%3A%2F%2Finfo.ashday.com%2Fblogs%2Fhellosign-esignatures-drupal-8&bu=https%253A%252F%252Finfo.ashday.com%252Fblogs&bvt=rss)
Rebranding ComputerMinds - Part 5: Development
Let's have a quick look through our development process on this project and pick out some of the more interesting bits. As briefly mentioned in the last article we are using a composer set up and all code is version controlled using git on github. All pretty standard stuff.
Frontend
In the previous article I briefly discussed how we set up Pattern Lab. Before getting stuck in to the components that would make up the pages of the site, we first needed to set up some global variables and grid. Variables allow us to reuse common values throughout the SCSS and if we need to make a change we can do so centrally. After adding variables for each of the colours and also a colour palette mapping which would allow to loop through all colours if we needed to throughout the project, we added variables for padding that would be used throughout and also font styles, after importing from Google Fonts.
CSS Grid
Although still relatively new, CSS Grid is a web standard and works in all modern browsers. So much simpler than using grid libraries like Susy we were keen to start using it on our projects and this was the perfect one on which to try it out. Set up was simple, partly due to the simple grid in the designs but mostly due to the simplicity of CSS Grid itself. A few lines of SCSS and the grid wrapper was set up:
A Year Later and Drupal Commerce is Still in Existential Crisis
AGILEDROP: Top Drupal blog posts from May
![](http://web.archive.org./web/20180602185407im_/https://www.agiledrop.com/sites/default/files/2018-05/charles-deluvio-651959-unsplash_1.jpg)
Disabling functionality temporarily during migration
Continuing with techniques from the “Acme” project, the location content type had an address field and a geofield, with field_geofield configured to automatically determine latitude and longitude from the associated field_address - a fact I was initially unaware of. Our source data contained latitude and longitude already, which I mapped directly in the migration:
field_geofield: plugin: geofield_latlon source: - latitude - longitude
However, testing location migrations by repeatedly running the import, I soon started getting messages from Google Maps API that my daily quota had been exceeded, and quickly tracked down the integration with field_address. Clearly, the calls out to Google Maps were both unnecessary and hazardous - how to prevent them? Fortunately, the migration system provides events which fire before and after each migration is executed. So, we subscribe to MigrateEvents::PRE_IMPORT to save the current settings and disable the external call:
How to strategize web personalization with Drupal
You might have listened to the new album of your favourite band on a music application. Or, you would have streamed a critically acclaimed movie on a video streaming platform. In both cases, you will notice suggestions curated especially for you based on your choice of music and movies. Personalized content is the way to go for providing the better user experience. Drupal has provisions for building personalization features into your site to tailor the content as per the interests of the user thereby enhancing user engagement.
![personalization](http://web.archive.org./web/20180602185407im_/https://opensenselabs.com/sites/default/files/inline-images/Screen%20Shot%202018-05-31%20at%204.47.13%20PM.png)
Proper analysis of web personalization criteria and strategies should prove vital for the digital firms. According to a research from Econsultancy, 94 percent of the in-house marketers agree that web personalization is really significant for the current as well as the future growth of their business.
Own your data (again)
My personal #gdpr today, May 25th 2018: completed my project to get back all my data from @Google, @evernote et al and host it all by myself with @Nextclouders, #joplin and dozens of other @OpenSourceOrg tools that come with the same convenience but with real privacy. Check!
Should I Fix my Existing Site or Build a New Site from Scratch?
How to Use Google Webfonts in Your Drupal 8 Site
![google webfonts](http://web.archive.org./web/20180602185407im_/https://www.ostraining.com/images/drupal8/font-your-face/google-webfonts.jpg)
Although Drupal has reputation for being a developers' platform, lots of user rely on Drupal's admin area for key tasks.
For typography in Drupal sites, the best way to change your site's fonts via the admin is a module called @font-your-face
The @font-your-face module allows you to work with webfonts like Google Fonts or Font Squirrel. It also provides the ability to work with paid font services like Typekit or fonts.com.
In this tutorial, you’ll learn how to configure and use this module in Drupal 8.
Drupal Europe Conference — Government Track
![](http://web.archive.org./web/20180602185407im_/https://cdn-images-1.medium.com/max/1024/1*NVJ9dY0OD6JxzCvJbugQXw.jpeg)
Government touches the lives of us all in fundamental ways. It is essential that government is able to communicate with its citizens in an effective and inclusive manner.
This communication requires high quality tools and special considerations regarding:
- exchange of information with each other and citizens in an open manner
- providing ability of citizens to see how their government is run
- protecting citizens’ data and privacy
- providing modern and easy to use technologies for both citizens and authorities
- contributing back their code and data, because it’s paid for by the citizens
Therefore, we have dedicated a special government track at the Drupal Europe Conference.
As you’ve probably read in one of our previous blog posts, industry verticals are a new concept being introduced at Drupal Europe and replace the summits, which typically took place on Monday. At Drupal Europe. These industry verticals are integrated with the rest of the conference — same location, same ticket and provide more opportunities to learn and exchange within the industry verticals throughout 3 days.
The Government vertical track of the Drupal Europe Conference is focused on trends and innovations as well as all aspects of the current developments and challenges within the government space.
In an exciting mix of case-studies, panel-discussion and thematic sessions the following, most burning topics will be discussed
A Specification Tool for Drupal 8
![speccing out an architectural (content) model speccing out an architectural (content) model](http://web.archive.org./web/20180602185407im_/https://dev.acquia.com/sites/default/files/styles/blog__190_x110_/public/blog/gettyimages-172183537.jpg?itok=k2ITNeml)
Revered management thinker Peter Drucker once wrote, “If you can’t replicate something because you don’t understand it, then it really hasn’t been invented; it’s only been done.” In many ways content modeling in Drupal has been done without being invented. For this reason, we’re developing a discipline for content modeling at Acquia. It’s drastically reducing both costs and defect rates for us.
Tags: acquia drupal planetDecoupled Drupal Hard Problems: Routing
As part of the Decoupled Hard Problems series, in this fourth article, I'll discuss some of the challenges surrounding routing, custom paths and URL aliases in decoupled projects.
Decoupled RoutingIt's a Wednesday afternoon, and I'm using the time that Lullabot gives me for professional development to contribute to Contenta CMS. Someone asks me a question about routing for a React application with a decoupled Drupal back-end, so I decide to share it with the rest of the Contenta Slack community and a lengthy conversation ensues. I realize the many tendrils that begin when we separate our routes and paths from a more traditional Drupal setup, especially if we need to think about routing across multiple different consumers.
It's tempting to think about decoupled Drupal as a back-end plus a JS front-end application. In other words, a website. That is a common use case, probably the most common. Indeed, if we can restrict our decoupled architecture to a single consumer, we can move as many features as we want to the server side. Fantastic, now the editors who use the CMS have many routing tools at their disposal. They can, for instance, configure the URL alias for a given node. URL aliases allow content editors to specify the route of a web page that displays a piece of content. As Drupal developers, we tend to make no distinction between such pieces of content and the web page that Drupal automatically generates for it. That's because Drupal hides the complexity involved in making reasonable assumptions:
GDPR compliance steps for Drupal Developers
The new GDPR laws are here, hurrah!
Having a number of developers handling databases from a number of client sites could easily be a nightmare, but we at ComputerMinds spent quite some time thinking about how to get and keep everybody safe and squeaky clean on the personal data front.
Here's a quick run-down of the key things to be aware of - and a pretty poster to help you keep it all in mind :)
Remove personal data from your system
- Review all databases on your computer, making sure to consider also those .sql dump files still sat in your downloads directory or your Recycle bin/trash.
- If there are databases that you need to keep on your system, then you must sanitize them by encrypting, anonymizing or removing personal data.
- Review all testing / UAT environments and ensure they're running off sanitized databases where possible.
Stay clean by using sanitized databases
Set up some _drush_sql_sync_sanitize() hooks to deal with personal data stored on your site. Then either have your Jenkins server use it to provide sanitized dumps, or ensure that your developers use it to sanitize databases immediately after importing.
When setting up your hook, make sure to consider things like:
Making the web easier and safer with the Web Authentication standard
Firefox 60 was released a few weeks ago and now comes with support for the upcoming Web Authentication (WebAuthn) standard.
Other major web browsers weren't far behind. Yesterday, the release of Google Chrome 67 also included support for the Web Authentication standard.
I'm excited about it because it can make the web both easier and safer to use.
Supporting for the Web Authentication standard will make the web easier, because it is a big step towards eliminating passwords on the web. Instead of having to manage passwords, we'll be able to use web-based fingerprints, facial authentication, voice recognition, a smartphone, or hardware security keys like the YubiKey.
It will also make the web safer, because U2F will help reduce or even prevent phishing, man-in-the-middle attacks, and credential theft. If you are interested in learning more about the security benefits of the Web Authentication standard, I recommend reading Adam Langley's excellent analysis.
When I have a bit more time for side projects, I'd like to buy a YubiKey 4C to see how it fits in my daily workflow, in addition to what it would look like to add Web Authentication support to Drupal and https://dri.es.
Episode 029: Wilbur Ince, Drupal Frontend Developer and Human Rights Activist
Are we afraid to estimate our work in Drupal and open source?
Estimation is not a new concept nor is it a bad word.
Estimation is not a new topic for anyone in the Drupal or open source community. We do it every day at our jobs. We even discuss estimation techniques at our conferences. We provide our clients with estimates when building and contributing back to open source project, yet we don't include estimations within our open source community and issue queues.
We all provide estimates to our clients - are we afraid to do it when it comes to Drupal and Open Source?
Before we take on this tough question, 'Are we afraid to estimate our work in Drupal and open source?', let's start off with a straightforward question: 'Why do we provide estimates to our clients?' The answer is just that our clients want to know how much something is going to cost and we want to know how much work is required to complete a project.
To give this discussion more context, let's begin with a very general definition of estimation
Here’s my hypothesis:
The Science of guessing - Drupal estimation techniques from project managers
While researching estimation within the Drupal community, I found a bunch of great presentations about project management and estimation. To me, "The Science of guessing - Drupal estimation techniques from project managers" by Shannon Vettes (svettes), Jakob Persson (solipsist), and Mattias Axelsson (acke), was the most comprehensive and inspiring presentation. Feel free to watch this presentation. I am going to pull a few slides from this presentation to help move through this exploration.