Top Banner
26

Bring drupal 8 to all in their native languages

Feb 13, 2017

Download

Engineering

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Bring drupal 8 to all in their native languages
Page 2: Bring drupal 8 to all in their native languages

Bring Drupal 8 to all in their native languages

SebCorbinGábor Hojtsy

Drupal.org session track

Page 3: Bring drupal 8 to all in their native languages

First of all...

The main purpose of this talk: translating the interface of Drupal and its modules.

➔ Present the current infrastructure/process

➔ Where we are for D8 support➔ Make the work of the translators

easier, and more recognized

Localization aka l10nThis is about translating the content of your Drupal site. Don’t worry, if you mixed up the subjects, this presentation may still be useful ;)

Multilingual will happen at 14:15 today, room 117

Internationalization aka i18n

Page 4: Bring drupal 8 to all in their native languages

How does it work?

Page 5: Bring drupal 8 to all in their native languages

It all started with the t() function

These source strings are extracted from Drupal and its modules using Potx and are grouped into *.po source files.

$text = t("@name's blog", array('@name' => format_username($account)), array('context' => 'Verb')

);

Page 6: Bring drupal 8 to all in their native languages

Then translate as any open source project does...

These .po source files can be translated with any Translation editor (e.g. POEdit or https://localise.biz/free/poeditor) and imported back in your Drupal site to be stored in locale_sources and locale_target tables.

Another option is to use the l10n_client module to directly edit the translations on your site.

Page 7: Bring drupal 8 to all in their native languages

But we are a community, so we have localize.d.o

This site executes Potx on every release that is made on Drupal.org, and offers a tool far more performant and flexible than a single editor:

● cross releases translations● cross projects translations● multiple translation groups handling● translations reviews● automatic downloads of translation on your site using the l10n_update

module or Drupal 8 core (yay!)

Page 8: Bring drupal 8 to all in their native languages

You and your site

drupal.orglocalize.drupal.org

l10n_server connector

ftp.drupal.org

releases.tsv

l10n_packager

l10n_update or D8 core

.po files

The community

potxl10n_community

+l10n_groups (og)

l10n_client

l10n_remote

l10n_client

.po files

Page 9: Bring drupal 8 to all in their native languages

Great news!

Issue created 01-02-2012

localize.drupal.org is now D7-powered!

Site ported 11-08-2015

Thanks a lot to Gabor Hojtsy, SebCorbin, dashoxa, droplet, hass, Balu Ertl, podarok, frederickjh, s_leu, laurentchardinThank also the Drupal Association: japerry, drumm, basic, opdavies

Page 10: Bring drupal 8 to all in their native languages

2nd great news!Drupal 8 core now ships with automatic

downloads of core and contrib translations (even during install)

Thanks to Gabor Hojtsy, herom, Sutharsan, miro_dietiker, ksenzee, duaelfr

Page 11: Bring drupal 8 to all in their native languages

Some numbers...

Page 12: Bring drupal 8 to all in their native languages

Current statistics■ 112 translation groups

■ 6040 contributors

■ 1 187 443 translations recorded

■ 593 431 strings to translate

■ 364 669 suggestions awaiting approval

■ 1 359 969 files scanned

Page 13: Bring drupal 8 to all in their native languages

Developer statistics■ 8 531 144 lines to match

file/line/type/project/release (1 237 MB)

■ 1 991 389 translated strings input by users

(suggestions or translations)

■ Overall database size: 6 GB

■ l10n_*-related tables : ~3 GB

Page 14: Bring drupal 8 to all in their native languages

Our current status

Page 15: Bring drupal 8 to all in their native languages

Drupal 8 compatibility is nearly done, 3 issues remaining:

2 criticals:

- Support for Drupal 8 shipped configuration translatables with

external dependencies (affects contrib)

- D8: TranslationWrapper class renamed to TranslatableString

A “minor”:

- Use a more sensible format for Yaml translation pattern

definition.

Potx

Page 16: Bring drupal 8 to all in their native languages

All good, now in Drupal 8 core.

The interface of Drupal 8 has been backported to a new 7.x-2.x

branch

l10_update

Page 17: Bring drupal 8 to all in their native languages

8.x-1.x : New UX based on Tour module

Main issues:

- Is far off in terms of D8 API

- Won’t highlight variable-based string (wut has fallback)

- Doesn’t actually save/send anything right now

Your help is needed!

l10_client

Page 18: Bring drupal 8 to all in their native languages

6.x-3.x: now discontinued, but has a lot of interesting remaining

issues that could get ported

7.x-1.x: now powering localize.d.o, can accept features requests

l10_server

Page 19: Bring drupal 8 to all in their native languages

How to improve?

Page 20: Bring drupal 8 to all in their native languages

On the Drupal site side, it’s gettings better (l10n_update), but:

■ Localization community needs more recognition

We need gamification by statistics, badges, ...

■ Infrastructure handling more and more strings

Need to archive old data, be able to identify old strings, improve search performance

■ Translation interface needs a revamp

Why not translate in apps like l10n_client?

■ The community aspects needs a push

Activity streams, glossary handling

Page 21: Bring drupal 8 to all in their native languages

An example: Transifex

■ Dead-simple interface (AJAX)

■ Fast, visual search

■ Suggestions, history, glossary,

comments on strings

■ Mass review, search & replace

■ Activity stream, announcements

Page 22: Bring drupal 8 to all in their native languages

Glossary

■ Currently an external French site

■ Votes on glossary suggestions

■ Exported via JSON

■ Displayed on localize.drupal.org

Page 23: Bring drupal 8 to all in their native languages

https://docs.google.com/spreadsheets/d/1AvuH8HfBxSx1SPmFIGs6Ue1hmDoVbMWKscWi_qY6_yE/edit#gid=0

Page 24: Bring drupal 8 to all in their native languages

Questions?Reactions?

Page 25: Bring drupal 8 to all in their native languages

Sprint: Friday

https://www.flickr.com/photos/amazeelabs/9965814443/in/fav

es-38914559@N03/

Sprint with the Community on Friday.

We have tasks for every skillset.

Mentors are available for new contributors.

An optional Friday morning workshop for first-time sprinters will help you get set up.

Follow @drupalmentoring.

Page 26: Bring drupal 8 to all in their native languages