<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Kunstmaan | Accenture Interactive - Medium]]></title>
        <description><![CDATA[Kunstmaan is an all-media branding and communication agency bringing the right message to the right audience through the right channels. - Medium]]></description>
        <link>https://medium.com/kunstmaan?source=rss----b4a149fef526---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Kunstmaan | Accenture Interactive - Medium</title>
            <link>https://medium.com/kunstmaan?source=rss----b4a149fef526---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 16 Nov 2026 02:45:31 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/kunstmaan" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How we created the conversational agent for the RMI]]></title>
            <link>https://medium.com/kunstmaan/how-we-created-the-conversational-agent-for-the-rmi-4434455862ce?source=rss----b4a149fef526---4</link>
            <guid isPermaLink="false">https://medium.com/p/4434455862ce</guid>
            <category><![CDATA[google-assistant]]></category>
            <category><![CDATA[bots]]></category>
            <category><![CDATA[conversational-interfaces]]></category>
            <dc:creator><![CDATA[Kris Pypen]]></dc:creator>
            <pubDate>Fri, 31 May 2019 08:30:14 GMT</pubDate>
            <atom:updated>2019-05-31T08:29:45.018Z</atom:updated>
            <content:encoded><![CDATA[<p>Either it’s too wet, or too cold, or <em>waaaaay </em>too hot.<br> It turns your barbecue party into a washout.<br> It makes sure you’re frozen to the bone when you go out for a run.<br> It has you sweating like a pig in your winter coat while waiting for the bus.</p><p>Surely it would be handy if you could ask someone about the weather, at any given moment. And that you would be given answers, bearing in mind your specific location and your personal situation.</p><p>We gathered all our experts in service and conversation design, copywriting and development round the table with the RMI, the <strong>Royal Meteorological Institute of Belgium</strong>. Together we designed an extension for your <strong>Google Assistant </strong>that tells you all about the local weather, tailored to your specific needs.</p><p>At <strong>Kunstmaan | Accenture Interactive</strong>, the process of creating a conversational agent starts with our UX strategists.They work with the client to define the end users needs &amp; wants and design the whole human experience. The <strong>Senior Software Architect</strong> works on the available information in the backend systems of the client and what is technically feasable. The digital <strong>Copywriter </strong>writes out conversations based on the tone of voice defined in the human centric designs and splits it into user intents: Making sure the Assistant really understands what the user actually wants when asking something. Finally a <strong>Developer</strong> starts setting up the fullfillment layer and configures the Dialogflow project. Our <strong>Testers</strong> have been trained to write test cases for this new kind of interface.</p><p>Let’s dive a bit deeper and explain how we <strong>actually — technically — </strong>created the RMI conversational agent.</p><p>This is where <a href="https://developers.google.com/actions/">Actions on Google</a> comes in. Actions on Google is the platform on which anyone can publish Actions for the Google Assistant. The recommended way to develop for Actions on Google is the conversational agent tool called <a href="https://dialogflow.com/">Dialogflow</a>. Dialogflow wraps the functionality of the <a href="https://developers.google.com/actions/sdk/create-a-project">Actions SDK</a>, and provides additional features such as an easy-to-use IDE, Natural Language Understanding (NLU), Machine Learning (ML), and more. Note that Dialogflow is actually owned by Google. It also allows you to create conversational agents for several other platforms as well (Facebook Messenger, Alexa, Slack,…), but that is out of the current scope.</p><p>A conversational agent on Dialogflow consists of several concepts, which are explained below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hu-u-0rTjTeSg_O9" /></figure><p>Pictured above: the <strong>hobby</strong> entity in the RMI Dialogflow project, mapping several synonyms or related hobbies to the same value. The resulting value is used for populating our request to the RMI API endpoint.</p><p>Entities are sets of variables that are limited to certain values, so you can compare them to Enums. Dialogflow provides a set of predefined entities that are either a limited set (such as @sys.address, or @sys.flight-number), or unlimited sets (such as @sys.last-name), but it’s also possible to create your own entities. These entities are recognised by Dialogflow in user queries, and the resulting values are sent up to any webhooks if specified.</p><p>In our RMI project, several alternative wordings for watersport (surfing, sailing, swimming) are defined, so Dialogflow will all match these to the same value. The RMI API endpoint takes an integer as parameter for “hobby type”, which is why the value for the watersport entity is set to the value 3.</p><p>Similar to hobbies we use entities for <strong>clothing types, cities/locations, datetimes, and more.</strong></p><p>Be sure to populate your custom entities in all supported languages though!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/0*Cu3Uck016nBfTUiW" /></figure><p>Pictured above: sample training phrases for the <strong>hobby intent</strong>. There are several ways to state the same intent, and recognised entities are clearly marked in different colors. A Dialogflow intent matches a user’s intent to <strong>do</strong> something, in this example the user wants to know if the weather is good for a certain hobby (in particular, the types of hobby defined in our hobby entity). You can define several ways the user could state this intent, with or without certain (optional) parameters. After providing these training phrases (in all languages), Dialogflow will be able to match user queries with the correct intent, even if they do not match completely by using <strong>Natural Language Understanding (NLU)</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/794/0*lpW9GvkSgysvw0iB" /></figure><p>Pictured above: The list of entities used as parameters in our hobby intent. The hobby entity is marked as required, causing the conversational agent to automatically prompt the user if this is missing.</p><p>For each intent, you can provide a list of entities that might be mentioned in the user query, and mark some of them as required. Marking an entity as required will cause the conversational agent to automatically prompt the user for this value. As soon as all required entities in an intent are known, Dialogflow will resolve the intent. It’s possible to resolve the intent directly within Dialogflow (by providing a default static reply), or to trigger a webhook. In both options you will have the inputted entity variables available to use in your response, and in the case of a webhook these can be used in your business logic.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XeX3Ml3tYl-AlJIa" /></figure><p>Pictured above: the “clothing” follow-up intent for the <strong>weather context</strong>.</p><p>Intents can provide an output context in which they can store certain variables. Other intents can be made triggerable only when certain contexts are active (as seen above), which makes them ideal for <strong>follow-up questions</strong>.</p><p>The easiest way to explain contexts are by using a real-world example. Imagine the following conversation:</p><p><strong>What’s the weather this Thursday in Brussels?</strong><br><em>RMI agent replies with the weather info for Brussels on Thursday.</em><br><strong>Will I need sunglasses?</strong><br><em>RMI agent replies to the question based on the weather for Brussels on Thursday</em></p><p>As you can see, the follow-up response takes into account the context of the conversation, as all weather intents store information such as location and date into the weather context. Follow-up intents can then utilise this context to <strong>fill in the gaps</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XM6KQwsuVyldCsM2" /></figure><p>Pictured above: A basic text response for the exit intent. It’s also possible to use variable entities from the intent in the response.</p><p>For simple responses that don’t require any business logic it it possible to define them straight in Dialogflow. It’s also possible to provide specific visual responses for Actions on Google such as cards or carousels on phones or other devices with a display.</p><p>However, it’s also possible to trigger a <strong>webhook</strong> request for the response, which Dialogflow calls <a href="https://dialogflow.com/docs/fulfillment"><strong>Fullfillment</strong></a>. These webhooks will do a POST request to an endpoint of your choosing. Note that the endpoint is the same for all intents, so the first thing you’ll need to do in your business logic is to differentiate between the different intents.</p><p>There are several ways to build your own webhook endpoint. Google’s recommendation is the <a href="https://github.com/actions-on-google/actions-on-google-nodejs">Actions on Google Node.js library</a>, which we’ve also used for this project. For other internal projects we’ve built prototypes in Java as well, so it doesn’t really matter which backend language you use, as long as you can easily work with JSON objects.</p><p>On completion of an intent that has Fullfillment enabled, Dialogflow will do a POST call to your endpoint with the intent, all relevant entities, and contexts. Your endpoint should be responsible for translating the Dialogflow JSON objects to valid API calls for your <strong>business logic</strong>, and format the response from the API calls back into response JSON objects for Dialogflow. All of this is required to take less than 5 seconds RTT, since the Google Assistant will mark your conversational agent as non-responsive if any response takes longer than 5 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BQAuFzG8ge-4HswO.jpg" /></figure><p>Hooking up your Dialogflow project with your business logic via a fulfillment webhook completes your conversational agent. You can see an image above of this complete architecture, of which we’ve only scratched the surface. With Dialogflow as your conversational agent tool, you’re <strong>not just limited to the Google Assistant</strong>. It provides integrations with all major plagforms, including Facebook Messenger, Alexa, Slack, and others. On top of that, there are several SDK’s available for multiple platforms so your conversational agent can be fully integrated within your web-app, mobile app or even watch app.</p><p><em>Originally published at </em><a href="https://labs.kunstmaan.be/blog/how-we-created-the-conversational-agent-for-the-rmi"><em>https://labs.kunstmaan.be</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4434455862ce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kunstmaan/how-we-created-the-conversational-agent-for-the-rmi-4434455862ce">How we created the conversational agent for the RMI</a> was originally published in <a href="https://medium.com/kunstmaan">Kunstmaan | Accenture Interactive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Kunstmaan CMS Hackathon 2018]]></title>
            <link>https://medium.com/kunstmaan/kunstmaan-cms-hackathon-2018-7ffd026c75af?source=rss----b4a149fef526---4</link>
            <guid isPermaLink="false">https://medium.com/p/7ffd026c75af</guid>
            <category><![CDATA[cms]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[symfony]]></category>
            <dc:creator><![CDATA[Ruud Denivel]]></dc:creator>
            <pubDate>Wed, 11 Apr 2018 13:49:02 GMT</pubDate>
            <atom:updated>2018-04-11T13:49:01.559Z</atom:updated>
            <content:encoded><![CDATA[<p>Creating a website? When deciding on your technology stack, you need to choose the best tools for the job.<br> Find out why everyone is talking about Kunstmaan CMS, the hottest PHP content management system on offer!</p><p>Friday 27th and Saturday 28th April are the dates for your calendar. Come along and join the Kunstmaan CMS Hackathon. Food, drinks, coding, there will even be prizes!</p><h3>About the CMS</h3><h4>Built on Symfony Framework</h4><p>If you’ve used Symfony before, then you’ll already know just how easy it is to create powerful applications for your clients. Our open source CMS comes with a wide range of features out of the box designed to make development fast and enjoyable, whilst giving your clients the control they need over their website’s content.</p><ul><li>Great looking user friendly interface</li><li>High quality extendable open source code</li><li>Growing user base and community</li></ul><h4>Awesome features</h4><ul><li>Flexible page content management system</li><li>Menu, navigation, and publishing management</li><li>Fully integrated media manager</li><li>Versioning for pages, forms, content, and draft content</li><li>Internationalisation by default. Make your site multilingual!</li><li>Built-in Google Analytics dashboard</li><li>List management system with export to CSV/XLSX/ODS</li><li>SEO metadata editor</li><li>Form builder admin section</li><li>Command line tools</li></ul><p>If you’d like to learn more, don’t miss out, join us in attending The Kumathon 2018!</p><h3>About the Hackathon</h3><h4>What’s happening?</h4><p>Come and experience it for yourself. People from near and far will come to Kunstmaan’s offices in Leuven for a fun-packed 24 hours. Whether you are a developer or not, there is something for everyone.</p><p>For non-coders, we will a hold master class session guiding new users through the CMS admin section. You will learn just how easy it is to manage a site, creating pages, managing content, handling images and other media, and much much more! There will also be an opportunity to suggest improvements during a brainstorming session.</p><h4>Get hacking!</h4><p>After the introductory sessions, it’s time to get coding! There will be prizes! Select your mission:</p><ul><li>Make the CMS compatible with Symfony 4</li><li>Create a brand new UX for the admin interface</li><li>Do a SWOT analysis of the CMS and other competitive CMS systems</li><li>Integrate a chatbot into the CMS</li><li>Improve the test suite</li><li>One of your very own ideas please!</li></ul><h4>Schedule</h4><p><strong>Friday 27th</strong></p><ul><li>6–7PM Food &amp; drinks</li><li>7–8PM Start sessions</li><li>7–9PM Brainstorm</li><li>9–10PM Sharing ideas</li><li>10PM+ Hackathon</li></ul><p><strong>Saturday 28th April</strong></p><ul><li>9–10AM Breakfast</li><li>10AM-12PM Hack on</li><li>12–1PM Lunch</li><li>1–4PM Hack on</li><li>4–6PM Show off &amp; Prizes</li></ul><h3>Ready to rock?</h3><p>Register yourself on the <a href="https://kumathon.kunstmaan.be/">Kumathon 2018 website</a>. We look forward to seeing you there! Can’t wait that long? You can check out our CMS straight away by visiting <a href="https://bundles.kunstmaan.be/">https://bundles.kunstmaan.be/</a></p><p><em>Originally published at </em><a href="https://labs.kunstmaan.be/blog/kunstmaan-cms-hackathon-kumathon-2018"><em>labs.kunstmaan.be</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7ffd026c75af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kunstmaan/kunstmaan-cms-hackathon-2018-7ffd026c75af">Kunstmaan CMS Hackathon 2018</a> was originally published in <a href="https://medium.com/kunstmaan">Kunstmaan | Accenture Interactive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Orbit, a mail development toolkit]]></title>
            <link>https://medium.com/kunstmaan/introduction-orbit-a-mail-development-toolkit-dbe3e3e313ae?source=rss----b4a149fef526---4</link>
            <guid isPermaLink="false">https://medium.com/p/dbe3e3e313ae</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[html]]></category>
            <category><![CDATA[email]]></category>
            <dc:creator><![CDATA[Kevin Fivé]]></dc:creator>
            <pubDate>Wed, 11 Apr 2018 12:22:00 GMT</pubDate>
            <atom:updated>2018-04-11T12:25:02.055Z</atom:updated>
            <content:encoded><![CDATA[<h4>We all know email development can be a pain in the @#$%. Heck, sometimes you can take this phrase even literally: I mean who hasn’t pulled out a few hairs over some weird outlook bugs.</h4><p>Seeing as most front-end developers’ main focus does not lie in email development — yes there are dedicated email developers, bless them — the email development process may seem a tad tedious, if not repetitive. It may even feel like a journey back to a time where layouts based on nested tables were considered best practice.<em> “Well hello 1999, how’ve you been doing, it has been a while?”</em>.</p><p>For those of you who don’t know what we’re dealing with and why the development of an email isn’t always welcomed with open arms, consider this small example. Say you have to make a button. An orange button with rounded corners, to be precise.</p><p>Reproducing this in a website is rather straightforward, create a &lt;button&gt;&lt;/button&gt; tag, insert your CTA, and style this element in your linked stylesheet like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b76ec8ba2aeb91a6c8c9e26f343fdb4/href">https://medium.com/media/7b76ec8ba2aeb91a6c8c9e26f343fdb4/href</a></iframe><p>That’s it, you can even be smart and add a class to the button element so you can reuse the styling everywhere you want =&gt; <strong>code once, use everywhere you need</strong>.</p><p>Now if you want to do this in an email you’re code will look like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/36b28976b64c83afb0bf2fc736699429/href">https://medium.com/media/36b28976b64c83afb0bf2fc736699429/href</a></iframe><p>All of this for just one button. You can’t use external stylesheets (hence the inline styling), you can’t use semantic html elements: you’re stuck with tables instead, padding and margins don’t always behave nicely, which implies the use of spacer .gif(s), … the list goes on and this only for one button. With dozens of lines of html code for one single button, it’s not hard to imagine how the source code of a whole mail will look.</p><p>Saying it’s kind of a mess can be an understatement. Quick copy fixes, changing the href attribute of one link, … it all requires some searching, which is fine if the file has proper indentation, if that’s not the case: good luck and try to stay calm. The main reason why all of this is necessary, why we’re dealing with obsolete code, is Microsoft Outlook. Some time ago, someone had the brilliant idea of rendering web based content (the mail) with a text processor (Microsoft Word) instead of an actual browser designed to render web based content (Internet Explorer), granted that browser had quirks of it’s own, but still. Further details can be found <a href="https://www.campaignmonitor.com/dev-resources/guides/coding/">here</a>.</p><p>So can we do something about this, can we lighten the burden? Well, the good news is that there is a lot of open source tooling and automatisation available, you can find tools that inline your styles, test your mails, there’s even a <a href="https://github.com/zurb/inky">templating language</a> which prevents you from writing endless tables and makes it a lot more easy to keep an overview. So if there are a lot of options regarding speeding up email development, why add another one? Well, here at Kunstmaan we’ve used all kinds of different tools in our process, but every time there seemed to be something lacking. There wasn’t something that provided all functionality we wanted in the way we wanted. And that’s why we created <a href="https://github.com/Kunstmaan/orbit">Orbit</a>.</p><p>Orbit, at it’s base, is a boilerplate based on gulp and inspired by the <a href="https://github.com/zurb/foundation-emails-template">foundation-emails-template</a> from the lovely people at Foundation, who also happened to create the Inky templating language. It combines all the functionality we liked about other open source options with some features of our own. Let’s take a look at what’s included in the package:</p><p>Bloated HTML files for emails are a thing from the past, we’ve implemented the <a href="https://github.com/twigjs/twig.js/wiki">twigjs</a> templating language in orbit to enable us to divide our html into bitesize chunks of code, this improves legibility and makes small adjustments a lot less tedious. To further enhance legibility, Orbit also includes the Inky templating language this helps to minimise the amount of tables you have to write, i.e.: remember the orange button? With Inky you can just add a &lt;button&gt; element and our build task will generate all the required tables.</p><p>One of the biggest pains in developing emails was the endless copy pasting of styling of the same components, reusability is an unknown concept in email development. With Orbit you can just write SCSS like you normally would, add a class to a component, hook up styling and Orbit will take care of inlining it in the HTML when required, it also combines all mediaqueries in your scss files and injects them into the head of your html.</p><p>Another annoying, repetitive task we’ve come across related to images, to be more precise the location of the images used in an email. Presume you just finished writing your email code and want to test the whole thing, so sending it to litmus is the task at hand. This implies that all used images need to be hosted somewhere, not a problem just upload them to a ftp server, however changing the src attributes of all images from a local path to path on the server, and back gets very annoying after you’ve done it a couple of times. Orbit does this for you with the {{ asset() }} function, just pop in the filename and the path to the image will change depending on which task you run.</p><p>All content inside your mail is located in .yaml files. Searching through hundreds of lines of html code to change one sentence is a thing from the past. You’re welcome.</p><p>We’ve integrated Litmus testing in Orbit. Just specify your credentials in the main config.json file and you’re set to go. You can also send test emails to specific email addresses which will come in handy when your client wants to see the email.</p><p><strong>npm run start</strong></p><p>Is the default development task. It’ll compile the SCSS files, build the Twig templates, minify images and start up a local development server.</p><p><em>Note: the {{ asset }} function will set the base path for images to a local ./dist/img/</em></p><p><strong>npm run build</strong></p><p>Does everything the start command does but won’t start a local server. It’ll inline your styles into your html instead.</p><p><em>Note: by default Orbit creates an html file for each translation file located in the translations directory. You can build a specific version by running the build task with a language flag i.e: npm run build — — lang nl</em></p><p><strong>npm run zip</strong></p><p>Runs the build task and generates a zip package of all built html files and images.</p><p><strong>npm run test</strong></p><p>This builds your emails, deploys all images to a specified ftp server, sets the image base path to that location and sends a test to litmus using the credentials from the config.json file located in the root of your project.</p><p><strong>npm run mail</strong></p><p>Builds the mail and sends a test version to a specified email address.</p><p>As you can see in our <a href="https://github.com/Kunstmaan/orbit/blob/master/docs/roadmap.md">to do-list</a>, there are still some items to be sorted out. Also we see this as een evolving project and we’d love some community support, so if you’re interested in this project and would like to help us out improving it, submit issues on our <a href="https://github.com/Kunstmaan/Orbit/issues">issue list</a> or even better submit a <a href="https://github.com/Kunstmaan/orbit/blob/master/docs/pull-requests.md">pull request</a>.</p><p><em>Originally published at </em><a href="https://labs.kunstmaan.be/blog/orbit"><em>labs.kunstmaan.be</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dbe3e3e313ae" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kunstmaan/introduction-orbit-a-mail-development-toolkit-dbe3e3e313ae">Introducing Orbit, a mail development toolkit</a> was originally published in <a href="https://medium.com/kunstmaan">Kunstmaan | Accenture Interactive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Live editing translations in an Android application]]></title>
            <link>https://medium.com/kunstmaan/live-editing-translations-in-an-android-application-3a9c2849308f?source=rss----b4a149fef526---4</link>
            <guid isPermaLink="false">https://medium.com/p/3a9c2849308f</guid>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[i18n]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[code]]></category>
            <dc:creator><![CDATA[Michal Borkowski]]></dc:creator>
            <pubDate>Tue, 10 Apr 2018 14:00:00 GMT</pubDate>
            <atom:updated>2018-04-10T14:00:00.439Z</atom:updated>
            <content:encoded><![CDATA[<p>A tool that allows you to edit the translations from your application at run-time, so you can immediately see and share the changes.</p><p>The process of writing copy for a mobile applications can be quite complicated, especially when it is done by a copywriter:</p><ul><li>Provide them with access to the repository of your application? But, then the copywriter needs to be at least tech savvy, and you have to be willing to share your code.</li><li>Or do you give him a working application and a list of Strings? In that case, the copywriter can’t see the effect of the changes they make.</li></ul><p>At <a href="https://kunstmaan.be/">Kunstmaan | Accenture Interactive</a> we decided to develop a library that will simplify the whole process: we provide the copywriters with a version of the application tailerod for them.</p><p>And once the translation is done all the changes can be shared from the application in a format defined by the developer.</p><h3>Setup</h3><p>Let’s now go through the steps for adding this library to your own apps.<br>Before we begin, just a notice: we’re using 2 libraries here. kunstmaan-shaker-menu is a utility library that allows us to show a popup menu after shaking your phone, and kunstmaan-translations-editor is the actual translations tool.</p><p>Begin by adding the libraries as gradle dependencies. Our recommended approach is to only use the library in either debug or alpha builds, and not in beta or production.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/92f7ca03c7043b0018d4cde59b5cccf7/href">https://medium.com/media/92f7ca03c7043b0018d4cde59b5cccf7/href</a></iframe><p>Define the strings.xml files that we want to use in the library.<br>Let’s say we have a default strings.xml (without any modifier) used by our default locale (en_US) and a file for Dutch and French Locales with the same strings as the default one but untranslated (strings.xml (fr) strings.xml (nl) ).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5d8b03f242556b2503f159c72b31099c/href">https://medium.com/media/5d8b03f242556b2503f159c72b31099c/href</a></iframe><p>Then we build our library with those Locales,.<br>We also need to specify what is our default Locale and provide the fields from R.string and the Application context.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6f1e8fad2b52317307fafe0377410568/href">https://medium.com/media/6f1e8fad2b52317307fafe0377410568/href</a></iframe><p>Once the Translations library is setup, we’ll initialise our shake detection popup menu that can start the Translations tool from any activity.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a1b9b81772b9e3a35f634d803d874aea/href">https://medium.com/media/a1b9b81772b9e3a35f634d803d874aea/href</a></iframe><h3>Usage</h3><p>At this point, everything should be good to go and we can start translating!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6oWTdUp4QaHzwu5JT-ehFg.png" /><figcaption>Shake your phone on the screen to be translated and choose the popup menu item we setup earlier.</figcaption></figure><p>The strings are divided into 3 categories :</p><ul><li>Current : Strings from the current view</li><li>In memory : Strings present in memory</li><li>All : All Strings of the application</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1VyOP9sPEai5nvD9bNyHNQ.png" /><figcaption>We can see the Strings that are present on the screen we came from. Let’s edit them.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*115M-QNbKThlXRQsUlT4lw.png" /><figcaption>We also can see and edit the version of this string in other Locales</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JPp7RS5GT4B8ETJaqkgILw.png" /><figcaption>Now we want to see the changes in the application, we just have to press the “Apply Changes” button, and the app will restart with your translation changes applied.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bFGsohWZFFmJAg3rfxwYPw.png" /></figure><h3>Additional features</h3><p>There are a few extra features provided in our tool:</p><h4>Add a pattern that the library will ignore.</h4><p>Let’s say you are using a library you use to debug or simply you don’t want some of your strings to appear in the translations list. You can use a <a href="https://docs.oracle.com/javase/8/docs/api/java/util/regex/Pattern.html">regex</a> to specify which keys from strings.xml should be ignored.</p><p>E.g.: this regex that compiles to “all words beginning with to_be_ignored”</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/73efbbf1fb1625cf41756e4561f1fcb3/href">https://medium.com/media/73efbbf1fb1625cf41756e4561f1fcb3/href</a></iframe><p>makes that this string (from strings.xml) will not be shown in the translations list (no matter if it is on the screen or not).</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0f1b52a74cfad3e94675f31b0e6f11b3/href">https://medium.com/media/0f1b52a74cfad3e94675f31b0e6f11b3/href</a></iframe><h4>Set a custom format for the file that will be shared.</h4><p>The Library provides two default formats for the Strings you share, xml and json :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2977f3acf281c1298002718103d052ce/href">https://medium.com/media/2977f3acf281c1298002718103d052ce/href</a></iframe><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/43a48884ff19eb56b0b5e3789d9210e9/href">https://medium.com/media/43a48884ff19eb56b0b5e3789d9210e9/href</a></iframe><p>If this defaults doesn’t suit your needs, you can specify your own.<br>Use this placeholders in a string and they will be replaced with the value they represent :</p><ul><li>${key}</li><li>${locale}</li><li>${newValue}</li><li>${oldValue}</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/16de9cc34be1a4e0ecb83788e2f7992b/href">https://medium.com/media/16de9cc34be1a4e0ecb83788e2f7992b/href</a></iframe><p>will give this output, when shared in json :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0bf7b9debe620e8742c92998e45948d5/href">https://medium.com/media/0bf7b9debe620e8742c92998e45948d5/href</a></iframe><h4>Search for strings in the list.</h4><p>On each screen (Current, In memory, All) you can search for strings.</p><p>The search will be performed on the keys and values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A-Bax5DnKuVIUjvPhIff-A.png" /></figure><h4>Filter changed/unchanged values.</h4><p>I you want to see only the values that are changed or unchanged, the overflow menu has buttons to filter those values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OcYxtyFAPgBLDFFezNClLA.png" /></figure><p>The translations library and shaking detection library can be found on GitHub with working examples:</p><p><a href="https://github.com/Kunstmaan/KunstmaanTranslationsEditor">Kunstmaan Translations Editor</a></p><p><a href="https://github.com/Kunstmaan/KunstmaanShakerMenu">Kunstmaan Shaker Menu</a></p><p><em>Originally published at </em><a href="https://labs.kunstmaan.be/admin/preview/blog/live-editing-translations-in-an-android-application"><em>labs.kunstmaan.be</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3a9c2849308f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kunstmaan/live-editing-translations-in-an-android-application-3a9c2849308f">Live editing translations in an Android application</a> was originally published in <a href="https://medium.com/kunstmaan">Kunstmaan | Accenture Interactive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter, Slack, and Firebase]]></title>
            <link>https://medium.com/kunstmaan/flutter-slack-and-firebase-d1f7b2b4e207?source=rss----b4a149fef526---4</link>
            <guid isPermaLink="false">https://medium.com/p/d1f7b2b4e207</guid>
            <category><![CDATA[dart]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[slack]]></category>
            <category><![CDATA[flutter]]></category>
            <category><![CDATA[firebase]]></category>
            <dc:creator><![CDATA[Thomas Stockx]]></dc:creator>
            <pubDate>Tue, 10 Apr 2018 11:13:04 GMT</pubDate>
            <atom:updated>2018-04-10T11:13:03.515Z</atom:updated>
            <content:encoded><![CDATA[<h3>Playing Dart with Flutter, Slack, and Firebase.</h3><p><em>Flutter’s recent beta release has turned quite a few heads in the mobile development scene recently. As a result, we’ve decided to open source our </em><a href="https://github.com/Kunstmaan/flutter_slack_oauth"><em>Slack OAuth library for Flutter</em></a><em> (and </em><a href="https://github.com/Kunstmaan/flutter_slack_oauth_firebase"><em>optionally, Firebase</em></a><em>). Here’s a short rundown of what it’s all about.</em></p><p>Google’s mobile UI framework <a href="https://flutter.io/">Flutter</a> is the new kid on the block in terms of cross platform mobile app development (Android and iOS). It’s a very promising framework doing all of the rendering directly in 2D, avoiding the use of OEM widgets. This means it can guarantee consistency between iOS and Android apps, even though it also provides the tools to differentiate in different themes (e.g. Cupertino vs. Material) depending on target device.</p><p><a href="https://www.dartlang.org/">Dart</a> is the programming language used for writing apps in Flutter. Since both Dart and Flutter haven’t seen much usage outside of Google yet (even though both have been used in production apps), it means that there still are a limited amount of plugins/packages/libraries available for the framework.</p><p>A great list of open source Flutter plugins called <a href="https://github.com/Solido/awesome-flutter">awesome-flutter</a> is being curated and updated weekly by Robert Felker.+</p><h4>Slack OAuth</h4><p>For an internal app at <a href="https://kunstmaan.be/">Kunstmaan | Accenture Interactive</a> which required easy authentication for employees and contractors, we decided to use <a href="https://api.slack.com/docs/oauth">Slack OAuth</a> for authentication. It meant we wouldn’t need to use our own authentication logic; someone who could successfully log in to our Slack Team could also use our internal app. The use case for this is quite clear: You want to authenticate people through their Slack credentials, but you don’t plan using any other features of the Slack API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*B32ao8X6ezKa0nYw." /><figcaption>Slack OAuth flow. In our first use case, we can actually stop after step 4, since the user has been authenticated on Slack at that point. (© Slack)</figcaption></figure><h4>Flutter and Slack OAuth</h4><p>Since there was no (up to date) generic library which handled OAuth locally on device out of the box and we wanted to stay within the Slack style guidelines, we decided to implement an easily reusable <a href="https://github.com/Kunstmaan/flutter_slack_oauth">Slack OAuth library for Flutter</a>. This way our library would not only be able to handle the OAuth sign-in logic, but also be responsible for the UI during that flow (including a properly styled “Sign in with Slack” button widget matching Slack’s style guidelines).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/0*-acHDRfdhRlfkafD." /><figcaption>Our Flutter “Sign in with Slack” button widget.</figcaption></figure><p>Providing the “Sign in with Slack” button as a carefully crafted widget (even including the fonts used by Slack) instead of an image gave us multiple advantages:</p><ul><li>The button can be 100% styled depending on its state.</li><li>Clean interface for starting and ending the OAuth flow:</li><li>Our SlackButton widget will handle everything including opening a WebView to handle the Slack OAuth, listen on redirects with authentication codes,…</li><li>The only thing you need to provide is an onSuccess (and onCancelled/onFailure) callback.</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/028180bb2c1b890bf3a05cace2e03591/href">https://medium.com/media/028180bb2c1b890bf3a05cace2e03591/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/281/0*uQsP36iUIrm_RHtJ.gif" /><figcaption>Our SlackButton widget handles the full Slack OAuth flow, you only need to provide some onSuccess and onFailure callbacks.</figcaption></figure><h4>Optional Firebase integration</h4><p>On the other hand, you might want to be able to combine your Slack authentication with some actual backend logic. For example, you might want to store each user’s Slack Access Token, or you might want to populate your own database with the users from your Slack team automatically.</p><p>For these requirements, we created the <a href="https://github.com/Kunstmaan/flutter_slack_oauth_firebase">Slack OAuth with Firebase for Flutter</a> library. This library is built upon our basic Slack OAuth for Flutter library, but provides a FirebaseSlackButton widget which takes a Firebase Functions endpoint as parameter. We also provide some sample code for your Firebase Functions endpoint in the same repository. Our Firebase Functions will handle the Slack OAuth directly on Firebase, and return a <a href="https://firebase.google.com/docs/auth/admin/create-custom-tokens">Custom Token</a> to our Flutter library. That Custom Token is then used to authenticate a Firebase User. All this is automatically handled by our library, so the FirebaseSlackButton can be used as shown below:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6f450731cb9eebf2b9db5abc7c402638/href">https://medium.com/media/6f450731cb9eebf2b9db5abc7c402638/href</a></iframe><p>In our Firebase Functions sample code, we also show how to populate a <a href="https://firebase.google.com/docs/firestore/">Cloud Firestore</a> with two collections, one containing the most recent Slack access token for each user, and one containing user data. By utilising our flow for storing these Slack access tokens, you can easily make Slack API calls directly from your Flutter app, by getting the access token for the current user as follows:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/08256f7b7b4b1827d37548a879606a70/href">https://medium.com/media/08256f7b7b4b1827d37548a879606a70/href</a></iframe><p>Finally, our libraries also provide some basic data structures such as UserList and User, to quickly get started with some prototyping without needing to parse all of the Slack API calls manually.</p><p>You can check out both libraries on Github and Pub, and they’re featured on <a href="https://github.com/Solido/awesome-flutter">Awesome Flutter</a> as well.</p><p>Pull requests for new features or improvements are always welcome!</p><p><em>Originally published at </em><a href="https://labs.kunstmaan.be/blog/flutter-and-slack-oauth"><em>labs.kunstmaan.be</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d1f7b2b4e207" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kunstmaan/flutter-slack-and-firebase-d1f7b2b4e207">Flutter, Slack, and Firebase</a> was originally published in <a href="https://medium.com/kunstmaan">Kunstmaan | Accenture Interactive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How translations work internally on Android and how you can change them dynamically]]></title>
            <link>https://medium.com/kunstmaan/how-translations-work-internally-on-android-and-how-you-can-change-them-dynamically-2f3bbaec07a7?source=rss----b4a149fef526---4</link>
            <guid isPermaLink="false">https://medium.com/p/2f3bbaec07a7</guid>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[i18n]]></category>
            <category><![CDATA[code]]></category>
            <category><![CDATA[android]]></category>
            <dc:creator><![CDATA[Kris Pypen]]></dc:creator>
            <pubDate>Tue, 10 Apr 2018 11:10:49 GMT</pubDate>
            <atom:updated>2018-04-10T14:02:10.366Z</atom:updated>
            <content:encoded><![CDATA[<p>On Android every translation string is defined in a <a href="https://developer.android.com/guide/topics/resources/string-resource.html">strings.xml</a> file. At compile time, aapt wil put every values resource in a resources.arsc file, after which the R.java file (containing ids) is generated. But this resources.arsc file can not be changed while running the application. Android also does not provide a way to dynamically change the translations.</p><p>When you start digging into the Android source code, you’ll find lots of places where translation keys/ids get translated. In the end, all of them will end up in the <a href="https://developer.android.com/reference/android/content/res/AssetManager.html">AssetManager</a> class. This AssetManager contains a private array <em>mStringBlocks </em>containing the translation<em> values </em>and<em> blockIds. Other then that,</em> the AssetManager contains a private method <em>loadResourceValue</em> which returns the <em>blockId</em> based on the <em>resourceId</em>. With reflection we can work some magic, turn them public, and call them. Using this method, we can now get translations from memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lCvPCOiyVokCV6McmQn_Pw.png" /><figcaption>Based on a resId, AssetManager.loadResourceValue returns an index to get the correct StringBlock from the mStringBlocks array. The TypedValue object that is passed into the AssetManager.loadResourceValue method is updated with a data property which is the index of the SparseString within that StringBlock’s mSparseStrings array. With these 2 indexes, we have what’s needed for getting and setting the translated String value.</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0088c4c31bd17339ee5a1bf910d4ca6c/href">https://medium.com/media/0088c4c31bd17339ee5a1bf910d4ca6c/href</a></iframe><p>If we want to live change the translation values, the only thing we have to do is load the original value, and then change the in-memory array of StringBlocks.</p><p>To wrap it up in a proof of concept, we created a live translation editor where you can view the currently used translations and change them live. And <a href="https://github.com/Kunstmaan/KunstmaanTranslationsEditor/blob/master/kunstmaan-translations-editor/src/main/java/be/kunstmaan/translationseditor/utils/TranslationUtils.java">here</a> can you find the Util class itself to get and change the translations.</p><p>Our <a href="https://github.com/Kunstmaan/KunstmaanTranslationsEditor">live translation editor</a> also adds a way to export the changes you made so they can be imported in you Android or iOS projects.</p><p><em>Originally published at </em><a href="https://labs.kunstmaan.be/blog/how-translations-work-internally-on-android-and-how-you-can-change-them-dynamically"><em>labs.kunstmaan.be</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f3bbaec07a7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/kunstmaan/how-translations-work-internally-on-android-and-how-you-can-change-them-dynamically-2f3bbaec07a7">How translations work internally on Android and how you can change them dynamically</a> was originally published in <a href="https://medium.com/kunstmaan">Kunstmaan | Accenture Interactive</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>