Coder Social home page Coder Social logo

pebsconsulting / sketch-rtl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devinmancuso/sketch-rtl

0.0 2.0 0.0 261 KB

Automatically create RTL layouts of your designs with this plugin for Bohemian Coding's Sketch 3

License: Apache License 2.0

JavaScript 100.00%

sketch-rtl's Introduction

RTL | ⅃TЯ Sketch Plugin#

Designs that include text written in right-to-left languages are often rendered incorrectly.

This happens because some design tools don’t support proper RTL rendering. The result is often embarrassingly illegible gibberish masquerading as Hebrew, Arabic, or Persian text that defeats the purpose of connecting with those audiences. Unless you speak those languages, the mistakes might be hard to spot.

This Sketch plugin takes your designs and automatically creates RTL layouts on new artboards. This should speed up the process of creating RTL designs and improve RTL consistency across your designs.

example gif

Installation

Simply download the zipped plugin, extract it, and double-click to quickly install. This will add a new menu option under Plugins and a new shortcut: ⌘ + Shift + F

There is a demo file included in the zipped directory which you can experiment with.

Usage

Select one or more artboards and then press ⌘ + Shift + F or select RTL | ⅃TЯ from the plugin menu.

Features

At present the RTL plugin has the following features:

  • Mirror 1 or more artboards to RTL layout

  • Duplicates the artboard(s) and appends _rtl to translated artboard(s) so the plugin is non-destructive

  • Shift existing artboards on the same Y position to make room for duplicate artboards

  • Detect icon-font and SVG material icons that should be mirrored in RTL

Flipping Icons

The plugin includes a hashtable of icons which should be flipped in RTL mode. Using this it is able to guess at when an icon should be flipped.

Currently the plugin only supports icon flipping for SVG and material-icon-font

  • For SVGs from material.io/icons it looks for the standard layer name, e.g. ic_reply_black_24dp and attempts to match the icon name component "reply" to the list in the hashtable. This method only works if the layer names remain unchanged

  • For material-icon-font it gets the value of the TextElement (not the name of the text layer) and attempts to match that to the list in the hashtable.

Known issues

  • An empty groupLayer with the naming convention of an SVG e.g. ic_reply_black_24dp seems to cause the plugin to stop running for the current artboard.

Note

This is not an official Google product.

Acknowledgments

Kudos to Sketch Mate plugin for inspiration on how to cleanly handle artboard repositioning

License

Apache 2.0

sketch-rtl's People

Contributors

devinmancuso avatar ozzik avatar pravdomil avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.