Strimzi and debezium deployment in kubernetes

I have been trying to do this since 3 years ago. I have been trying to deploy and run Apache kafka in kubernetes cluster and use debezium for CDC to source from Oracle database. At that time most of the kubernetes APIs are still in beta and debezium version is something like 0.1 beta. There was no kafka operator for kuberenetes. I have to do every kafka related deployment by hands. Kafka is a kind of stateful application and it is very difficult to manage in stateless nature of kubernetes without operator. Debezium support for Oracle was also in alpha stage. I have failed to connect Oracle database using debezium connector because of many bug in the connector plugin. I followed debezium mailing list to know updates and maturity of the project to try it later again. Now its latest version is 1.6 and support for Oracle DB also very much stable.

Last week I tried to do this setup again. I found the project Strimzi. It is kafka operator for kubernetes. Latest version is 0.25.0. Although it is still in version 0.* it works perfectly. Here I will show how it is easy to deploy kafka in kubernetes using Strimzi and how easy to setup/configure CDC using debezium.

You need to have all kubernetes related utilities such as kubectl, helm and oracle database with logminer or xstream support. If you would like to start with minimal setup, you can use minikube or kubernetes kind. Here is the steps you need to follow.

  1. Prepare Docker image for debezium oracle connector
  2. setup helm repository and pull helm chart to get sample values.yaml
  3. Update strimzi helm values
  4. Deploy strimzi operator and kafka cluster with updated values
  5. Deploy debezium oracle connector plugin cluster
  6. Prepare Oracle database
  7. Apply kafka connector configuration for debezium oracle connector
  8. verify and check data stream

Prepare Docker image for debezium oracle connector

Debezium oracle connector need jdbc.jar and xstream.jar from oracle database client library. You need to get it from oracle download site. Here is Dockerfile content to build debezium oracle connector container image.

FROM quay.io/strimzi/kafka:0.25.0-kafka-2.8.0

ENV KAFKA_HOME=/opt/kafka

USER root:root

RUN cd /tmp; \
    curl -LO https://download.oracle.com/otn_software/linux/instantclient/213000/instantclient-basic-linux.x64-21.3.0.0.0.zip; \
    unzip instantclient-basic-linux.x64-21.3.0.0.0.zip; \
    cp instantclient_21_3/* ${KAFKA_HOME}/libs; \
    rm -rf instantclient_21_3; \
    rm instantclient-basic-linux.x64-21.3.0.0.0.zip

##########
# Connector plugin debezium-oracle-connect
##########
RUN mkdir -p ${KAFKA_HOME}/plugins/debezium-oracle-connect/deaf1cc4 \
        && curl -L --output ${KAFKA_HOME}/plugins/debezium-oracle-connect/deaf1cc4.tgz https://repo1.maven.org/maven2/io/debezium/debezium-connector-oracle/1.6.1.Final/debezium-connector-oracle-1.6.1.Final-plugin.tar.gz \
        && echo "fe5eb4d0dda150b10d24a6d9f3a631c493267a0dee2d72167a8841af5804c43a908d149e5bc4a87dc48f0747e26a1d85a930225eea7b9709726ea2abda95b487 ${KAFKA_HOME}/plugins/debezium-oracle-connect/deaf1cc4.tgz" > ${KAFKA_HOME}/plugins/debezium-oracle-connect/deaf1cc4.tgz.sha512 \
        && sha512sum --check ${KAFKA_HOME}/plugins/debezium-oracle-connect/deaf1cc4.tgz.sha512 \
        && rm -f ${KAFKA_HOME}/plugins/debezium-oracle-connect/deaf1cc4.tgz.sha512 \
        && tar xvfz ${KAFKA_HOME}/plugins/debezium-oracle-connect/deaf1cc4.tgz -C ${KAFKA_HOME}/plugins/debezium-oracle-connect/deaf1cc4 \
        && rm -vf ${KAFKA_HOME}/plugins/debezium-oracle-connect/deaf1cc4.tgz

USER 1001

Or you can use prebuilt image from here “registry.gitlab.com/herzcthu/debezium-oracle:1.6.1”

setup helm repository and pull helm chart to get sample values.yaml

helm repo add strimzi https://strimzi.io/charts/
helm pull strimzi/strimzi-kafka-operator
tar -zxvf strimzi-kafka-operator-helm-3-chart-0.25.0.tgz
code strimzi-kafka-operator/values.yaml

Update strimzi helm values

At line number 5 update this to watch kafka deployments in “kafka” namespace

watchNamespaces
- kafka:

At line number 47 to 50, you need to update values to use previous built image

kafkaConnect:
  image:
    registry: registry.gitlab.com
    repository: herzcthu
    name: debezium-oracle
    tag: 1.6.1

No alt text provided for this image

Deploy strimzi operator and kafka cluster with updated values

Deploy strimzi operator

kubectl create ns strimzi
kubectl create ns kafka
helm install strimzi strimzi/strimzi-kafka-operator -n strimzi -f values.yaml

Download deployment file sample from https://strimzi.io/examples/latest/kafka/kafka-persistent-single.yaml

Change replicaset to 3 and change other parameters according to your requirements

kubectl apply -f kafka-persistent-single.yaml -n kafka
kubectl wait kafka/my-cluster --for=condition=Ready --timeout=300s -n kafka 

Deploy debezium oracle connector plugin cluster

You need to create container registry credentials as k8s secret if you are using private repository for debezium oracle connector image.

kubectl -nkafka create secret docker-registry regcred --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>

Connector deployment file

apiVersion: kafka.strimzi.io/v1bet
kind: KafkaConnect
metadata:
  name: my-connect-cluster
  annotations:
#  # use-connector-resources configures this KafkaConnect
#  # to use KafkaConnector resources to avoid
#  # needing to call the Connect REST API directly
    strimzi.io/use-connector-resources: "true"
spec:
  version: 2.8.0
  replicas: 1
    image: "registry.gitlab.com/herzcthu/debezium-oracle:1.6.1"
    template:
      pod:
        imagePullSecrets:
          - name: regcred
    bootstrapServers: my-cluster-kafka-bootstrap:9093
    tls:
      trustedCertificates:
        - secretName: my-cluster-cluster-ca-cert
          certificate: ca.crt
    config:
      group.id: connect-cluster
      offset.storage.topic: connect-cluster-offsets
      config.storage.topic: connect-cluster-configs
      status.storage.topic: connect-cluster-status
      # -1 means it will use the default replication factor configured in the broker
      config.storage.replication.factor: -1
      offset.storage.replication.factor: -1
      status.storage.replication.factor: -1

Prepare Oracle database

This is a job for Oracle DBA. You can follow this documentation.

https://debezium.io/documentation/reference/connectors/oracle.html#_preparing_the_database

Apply kafka connector configuration for debezium oracle connector

apiVersion: kafka.strimzi.io/v1beta2
kind: KafkaConnector
metadata:
  name: debezium-oracle-server1
  labels:
    strimzi.io/cluster: debezium-oracle
spec:
  class: io.debezium.connector.oracle.OracleConnector
  tasksMax: 1
  config:
    database.server.name: "server1"
    database.hostname: "192.168.1.1"
    database.port: "1521"
    database.user: "dbzuser"
    database.password: "dbz"
    database.dbname: "DBZDB"
    # broker port 9092 is plain text and 9093 is for SSL/TLS
    database.history.kafka.bootstrap.servers: "my-cluster-kafka-bootstrap:9092"
    database.history.kafka.topic: "schema-changes.collections"
    schema.include.list: "SCHEMA_NAME"
    table.include.list: "SCHEMA_NAME.TABLE_NAME"

verify and check data stream

Check configuration

kubectl -n kafka run connect-cluster-configs -ti --image=quay.io/strimzi/kafka:0.25.0-kafka-2.8.0 --rm=true --restart=Never -- bin/kafka-console-consumer.sh --bootstrap-server my-cluster-kafka-bootstrap:9092 --topic connect-cluster-configs --from-beginning

Check connector status

kubectl -n kafka run connect-cluster-status -ti --image=quay.io/strimzi/kafka:0.25.0-kafka-2.8.0 --rm=true --restart=Never -- bin/kafka-console-consumer.sh --bootstrap-server my-cluster-kafka-bootstrap:9092 --topic connect-cluster-status --from-beginning

Check data streaming. Topic name format is SERVER_NAME.SCHEMA_NAME.TABLE_NAME

kubectl -n kafka run kafka-consumer -ti --image=quay.io/strimzi/kafka:0.25.0-kafka-2.8.0 --rm=true --restart=Never -- bin/kafka-console-consumer.sh --bootstrap-server my-cluster-kafka-bootstrap:9092 --topic server1.SCHEMA_NAME.TABLE_NAME --from-beginning

References:

  • https://github.com/strimzi/strimzi-kafka-operator/tree/0.25.0/helm-charts/helm3/strimzi-kafka-operator
  • https://debezium.io/documentation/reference/connectors/oracle.html

My first week with Astro Master Telescope

I’m a beginner with this sky watching and telescope thing. I’ve been reading articles about how to choose telescope for a beginner almost 3 years. I’ve been having difficulties choosing right telescope for me because what I can effort and what I think I should get what kind of telescope is always conflicting.
Anyway, now I’ve chosen Celestron Astro Master 130 EQ telescope with German equatorial mount. It costs about 500 USD in our country.

I’m still struggling to understand my telescope. I don’t even know which part of the mount should point to north. I can’t find any documentation on internet that shows clearly about my CG3 mount to point correctly to north. There is one angle shape on my German equatorial mount. I think it should point to north. So whenever I setup, I try to align that angle with north pole using compass on my phone.

Apart from I’m a beginner, I’m also having other obstacles with this sky watching things. I live in an apartment that face to north and there is another tall build at the north side of my building. I can’t even see north pole celestial star because of that building’s height. Another factor limiting my sky watching activities is weather. Since I’m living a country with raining season starting from late May to early November, average cloud coverage is more than 80% now a day everyday.

Since last week luckily, in some evening, clouds are clear on my north sky. Whenever I see sky is blue, I try to setup my telescope and try everything I know about my telescope.

At the beginning, I don’t even know which one is RA circle and which one is DEC circle. Even after I watched many YouTube tutorials, My brain and my hand still not communicating each other. Even now, I’m still struggling with up and down, left and right, RA and DEC when I use fine tuning handles. My RA circle come with factory settings, I didn’t even know that I should adjust it.

After struggling a week, I’m starting to understand more. Now I can find easily Vega because it is the bright star on my sky. Another star I can find with my telescope is Deneb. Both visible with naked eye if there is no cloud on the sky. I’m trying to find North America Nebula and Andromeda Galaxy. Still couldn’t find. But I will find it one day.

Another thing I’ve learned about telescope is about power. I though that magnifying is important for a telescope which is not true. Visibility is more important than magnifying. It is very similar to someone short-sighted person with glasses. Glasses do not magnify image for a short-sighted person, it make an image more clear and visible. What telescope does is very similar to that. It doesn’t magnify stars. It make more visible and more clear for your eye to see which you can’t see without telescope.

I will continue on writing about my experiences with my telescope and my sky watching activities. Still tune. Thanks for reading.

Django quickstart

###Installation

apt install libmysqlclient-dev

## Create requirements.txt files with following contents

```
django
django-adminlte2
mysqlclient
```
pip3 install -r requirements.txt

### database config

```

DATABASES = {
    # 'default': {
    #     'ENGINE': 'django.db.backends.sqlite3',
    #     'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
    # },
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'MartaliDial',
        'USER': 'martali',
        'PASSWORD': '[email protected]',
        'HOST': 'thwinnet.cemuepnzjf0e.us-west-2.rds.amazonaws.com',
        'PORT': '3306',
    }
}

```

### Development
python3 manage.py runserver

python3 manage.py migrate
python3 manage.py createsuperuser

### Update database
python3 manage.py migrate [app]

html5 လေ့ကျင့်ခန်း ၂

လေ့ကျင့်ခန်း ၂ မှာကတော့ style css မလိုဘဲ စာမျက်နှာတစ်ခုက စာသားတွေကို ဖော်ပြမယ့် စတိုင်တွေကို html ကုဒ်တွေသုံးပြီး ရေးလို့ရတဲ့ ကုဒ်တွေအကြောင်းပါ။ ဒီနေရာကစပြီး tag ဆိုတာကို ကုဒ်လို့သုံးပါမယ်။

  • ကုဒ်အများစုဟာ သူတို့ဖော်ပြပေးတဲ့ ပုံသဏ္ဍာန်ကို အခြေခံတာမဟုတ်ဘဲ လုပ်ဆောင်ချက်ကို အခြေခံတာဖြစ်ပါတယ်။ ကုဒ်တွေက စာသားတွေ ဘယ်လိုပုံစံရှိမယ်ဆိုတာကို သတ်မှတ်ပေးမယ့်အစား ခေါင်းစဉ်လား ကိုးကားချက်စာပိုဒ်လားဆိုတာမျိုး စာသားတွေမှာရှိတဲ့ လုပ်ဆောင်ချက်တွေကို သတ်မှတ်ပေးပါတယ်
  • စာသားများကို ဖော်ပြမည့် ပုံသဏ္ဍာန်ကို စတိုင်များ၊ ဘရောက်ဇာတွင် သုံးသူ စိတ်ကြိုက်သတ်မှတ်ပေးထားသည်များ နှင့် မူလ ဘရောက်ဇာသတ်မှတ်ချက်များမှ ထိန်းချုပ်ထားသည်။
  • ခေါင်းစဉ်များကို <h1> မှ <h6> (အကြီးဆုံးမှ အငယ်ဆုံး သုံး၍ သတ်မှတ်ပေးနိုင်သည်။
  • ခေါင်းစဉ်တစ်ခုနောက်တွင် အခြားခေါင်စဉ်ခွဲတစ်ခုရေးလိုသောအခါ Screen Reader နှင့် Outlines များမှ ယူနစ်တစ်ခုတည်းအဖြစ် ပြစေရန် <hgroup> ကို သုံးလိုက သုံးနိုင်သည်။
  • စာသားများကို စာလုံးအထူဖြင့်ပြစေရန် <b> ကုဒ်ကို သုံး၍ စာလုံးစောင်းဖြင့်ပြစေရန် <i> ကုဒ်ကို သုံးနိုင်သည်။
  • ထပ်ညွှန်းကိန်းပုံစံ စာသားအတွက် <sup> ကိုသုံး၍ အောက်ခြေမှတ်စု ပုံစံစာသားအတွက် <sub> ကိုသုံးနိုင်သည်။
  • မိုနိုစပေ့ သုံးထားသော စာသားများအတွက် အက္ခရာအားလုံးအတွက် တူညီသော အကျယ်ရှိသည့် ဖောင့်စာလုံးကိုသုံးသည်။ မိုနိုစပေ့ စာသား၏ ဆန့်ကျင်ဖက်မှာ အချိုးကျ စာသားဖြစ်သည်။
  • ပုံမှန်အားဖြင့် ဝဘ်ပေါ်ရှိ စာသားအများစုမှာ အချိုးကျပုံစံ ဖောင့်ကိုသုံးသည်။ မိုနိုစပေ့ ဖောင့်ကိုသုံးရန် သတ်မှတ်လိုလျှင် <kbd>၊ <code>၊ <samp> ကုဒ်တို့ကို သုံးနိုင်သည်။ html5 တွင် မိုနိုစပေ့ စာသားများအတွက် <tt> ကို အသုံးပြုခြင်းအား ပံ့ပိုးမှုမရှိတော့ပါ။
  • ပုံမှန်အားဖြင့် ဝဘ် ဘရောက်ဇာများသည် အပိုနေရာလွတ်များကို အလိုလိုဖယ်ရှားပစ်ပြီး စာပိုဒ်ခွဲခြင်းများ <h1> ကုဒ်ကိုသုံး၍ စာပိုဒ်ခွဲထားသည်များမှ လွဲ၍ ကို လှစ်လျှုရှုလိုက်သည်။ စာသားတစ်ခုတွင်ပါဝင်သော နေရာလွတ် စပေ့များနှင့် စာပိုဒ်များကို ပုံဖော်ပြသေပေးစေရန်အတွက် <pre> ကြားတွင် စာသားများကို ထားခြင်းဖြင့် သတ်မှတ်ပေးနိုင်သည်။
  • ကိုးကားချက်စာပိုဒ်များကို ထည့်သွင်းရန် <blockquoat> ကုဒ်ကိုသုံးပါ။ ဤကုဒ်တွင် cite=”URL” အထူးပြု သတ်မှတ်ချက်ထည့်သွင်းပေးနိုင်သည်။ သို့သော် ဘရောက်ဇာအများစုမှ ၎င်းကို အသုံးမပြုပါ။
  • Internet Explorer တွင် မူသေ စာလုံးအရွယ်အစားကို View မီနူးမှတဆင့် သတ်မှတ်ပေးနိုင်သည်။ သို့သော် ဒီနည်းက သင့် Internet Explorer ကိုသာ ပြုပြင်လိုက်ခြင်းဖြစ်ပြီး စာမျက်နှာကို ပြုပြင်ခြင်းမဟုတ်ပါ။
  • မူသေ ဖောင့်စာလုံးကို Internet Options မှတဆင့် ပြောင်းလဲသတ်မှတ်ပေးနိုင်သည်။

html5 လေ့ကျင့်ခန်း – ၁

  • html5 အဖြစ်သတ်မှတ်ပေးရန် ထိပ်ဆုံးတွင် <!DOCTYPE html> ကို ရေးဖြစ်အောင်ရေးပါ DOCTYPE သည် စာလုံးအကြီးဖြင့် ရေးသင့်သည်။
  • DOCTYPE မှလွဲ၍ HTML ကုဒ်အားလုံးကို <html> နှစ်ခုအတွင်းတွင် ရေးသည်
  • <html> နှင့် </html> ကြားတွင် <head> နှင့် <body> အပိုင်းများကို ရေးသည်
  • <head> တွင် <title> နှင့် အခြား <meta> များပါဝင်ပြီး <body> တွင် စာမျက်နှာတစ်ခုကို ပုံဖော်ပြသပေးမည့် အခြား စာသားများအားလုံးပါဝင်သည်
  • စာပိုဒ် တစ်ပိုဒ်ချင်းစီကို အဖွင့်အပိတ်ပါဝင်သော <p> များကြားတွင်ရေးသည်။ စာမျက်နှာတစ်ခုကို ဖော်ပြသောအခါ ဘရောက်ဇာအများစုသည် စာပိုဒ် ၂ ပိုဒ်ကြားတွင် နေရာလွတ် စပေ့ တစ်ခုကို ထည့်သွင်းပေးလေ့ရှိသည်။
  • စာပိုဒ်သစ်တစ်ခု စတင်ရေးသားခြင်းမပြုဘဲ စာကြောင်းတစ်ကြောင်းကို ရပ်နား၍ အသစ်ရေးလိုသောအခါ တစ်ခုတည်းသာရှိသာ <br> ကိုသုံးသည်။
  • XHTML များကို ရေးသားသာအခါ တစ်ခုတည်းသော ကုဒ်များကို စပေ့တစ်ခုနှင့် မျဉ်းစောင်း (/ တစ်ခုဖြင့် အဆုံးသတ်ပေးရန်လိုသည်။ စပေ့သည် HTML အဖြစ် သိနိုင်စေရန် လိုအပ်ပြီး မျဉ်းစောင်းသည် XHTML အဖြစ် သိရှိနိုင်စေရန် လိုအပ်သည်။
  • <head> တွင်ပါဝင်သော <meta> သည် သော့ချက်စကားလုံးများနှင့် စာရေးစနစ် (encoding language များကို ဖော်ပြရန် သုံးသည်။
  • <title> နှင့် </title> ကြားတွင် ရေးသားသော စာသားသည် ဘရောက်ဇာ နှဖူးစီးတွင် ပေါ်လာလိမ့်မည်။ ၎င်းတို့ကို <head> အပိုင်းတွင် ထားပါ။

How to clone your ubuntu OS using rsync.

2nd pc – install ssh-server
make a partition with ext4

$sudo su
#apt-get install openssh-server
#mount /dev/sda<num> /<mount_point> eg. #mount /dev/sda4 /mnt

1st pc – run rsync
(PC1)$sudo rsync -av –one-file-system –exclude=/proc/* –exclude=/dev/*
–exclude=/sys/* –exclude=/tmp/* –exclude=/home/* –exclude=/lost+found
–exclude=/var/tmp/* –exclude=/boot/grub/* –exclude=/root/*
–exclude=/var/mail/* –exclude=/var/spool/* –exclude=/media/*
–exclude=/etc/fstab –exclude=/etc/mtab –exclude=/etc/hosts
–exclude=/etc/timezone
–exclude=/etc/X11/xorg.conf* –exclude=/etc/gdm/custom.conf
–exclude=/etc/lightdm/lightdm.conf /[email protected]<ipaddress_of_second_pc>:/<mount_point_to_ext4>

after rsync complete

ssh from 1st pc to 2nd pc

(PC1)$ssh [email protected]<ipaddress_of_second_pc>

#cd /<mount_point_to_ext4>
#mount -t proc /proc proc/
#mount -t sysfs /sys sys/
#mount -o bind /dev dev/
#mount -t devpts /dev/pts dev/pts/
#chroot . /bin/bash

#grub-install /dev/sda –force
#update-grub

#mkdir home/<standard_username_from_pc1>

#chown -Rf <standard_username_from_pc1>:<standard_username_from_pc1> home/<standard_username_from_pc1>/

#chmod 755 home/<standard_username_from_pc1> -Rf

if you want to change username and home dir.

#usermod -l <newname> -d /home/<newdir> -m <current_username>

#groupmod -n <newgroup> <current_group>

if you want to enable swapfile

#dd if=/dev/zero of=/swapfile bs=1G count=4 (This will create 4GB swapfile)
#mkswap /swapfile

#nano /etc/fstab
and add the following line

/swapfile   none    swap    sw    0   0
 

#reboot

Handbook for WordPress Translators

WordPress Translators Handbook

Note: This page is copied from http://docs.svn.wordpress.org/trunk/en/translators/handbook.html and edited by myself.

Table of Contents

  1. Starting a new translation

    1. Why would I want to translate WordPress?
    2. What should I know in advance?
    3. Choosing locale name
    4. Requesting a new locale
    5. Adding more users to a repository
  2. Translating

    1. General guidelines
    2. Building a glossary for your language
    3. Message types
    4. Placeholders
    5. Translator comments
    6. Contexts
    7. Source-file references
  3. Translations repository

    1. General guidelines
    2. Building a glossary for your language
    3. Message types
    4. Placeholders
    5. Translator comments
    6. Contexts
    7. Source-file references
  4. Translation Tools

    1. Gettext overview
    2. Gettext command-line tools
    3. poEdit
    4. Pootle
  5. Local sites at <locale>.wordpress.org

    1. Requesting a new site
    2. Translating the site interface
    3. Requesting translations deploy
    4. Editing content
    5. Building local packages
    6. Releasing new versions
    7. Adding users
    8. Editing the main menu
    9. Showcase
  6. Local forums at <locale>.forums.wordpress.org

    1. Requesting a new forum
    2. Translating the forums interface
    3. Requesting translations deploy
    4. Adding moderators
  7. translate.wordpress.org

Starting a new translation

Why would I want to translate WordPress?

WordPress is a free software project. What this means is that everybody can contribute to it, and is encouraged to, in order for it to develop. That’s why every free software project needs volunteers — people who are willing to contribute their free time to development of a particular piece of software, either by helping write code, design graphics, or… translate it. That’s where you come in.

There are numerous ways your community could benefit from your translation. The most obvious one is probably enabling people who don’t speak English to use WordPress at all. The lack of a translation could prove to be a difficult barrier for many to pass, so a translation is necessary for them to make use of WordPress. Many people also simply prefer to have their software translated, and would grab your translation just because of that.

Every translation can get a local website, which can contain static pages, a blog, a download section, where people can download all the releases of your translation, and an automatic update feature for all WordPress sites in your language! This means that every time a new version of your translation is released, its users are offered an upgrade on the dashboards of their own websites.

If your country has a great number of WordPress users, or gains one thanks to your translation, you may find that a place to provide each other with help could be nice. If you have been translating WordPress for some time and your translation is well established, you can request the creation of local forums. Other than providing each other with help, users of your translation could also exchange their views on WordPress and suggest changes that could be applied to your translation in one place hosted on the official WordPress servers.

Oh, and did I mention you get to work with a lot of great people?

What should I know in advance?

You should know about basic html tags because some strings include html tags.(required)

You should know how SVN works and how WordPress use SVN repo for translation teams.(required)

Read codex page Using Subversion

You should know basic php syntax because you may need to look at in php source files for references.(optional)

Before request a new locale, take a look at translate.wordpess.org and translate.wordpress.com (glotpress). If your locale is there, you don’t need to request a new locale.

If your locale is in glotpress, your first step to translate is register at WordPress.org and WordPress.com. You can use those account to login at glotpress. If you want to translate WordPress.org package, use your account at WordPress.org and login to translate.wordpress.org. If you want to translate WordPress.com blogs, use your account at WordPress.com and login to translate.wordpress.com. Note:your translation still need to approve by validator of your locale to include in actual translation packages.

If your locale is not in glotpress or your locale has no validator at all, you can take further steps

Choosing locale name

You cannot choose locale name yourself. WordPress use iso language code. Here is some references for language locale code.

Requesting a new locale

Requesting a new locale is an easy and quick step if you are doing right thing.

  • First : Visit http://wppolyglots.wordpress.com.
  • Second : Read tags policy.
  • Third : Post a new request with correct tags. (i.e. request, validator, locale, {locale code} )
  • Fourth : Wait a few hours, your locale will be ready to translate. (Sometime take only a few minutes.)

Adding more users to a repository

Repository access control by WordPress.org itself. If you want to add new user to repo the only way is to post a request at wppolyglots.wordpress.com. Current responsible person for repo access control is .

Local sites at <locale>.wordpress.org

Requesting a new site

If there isn’t a WordPress.org subdomain site in your language, you can request it at wppolyglots.wordpress.com. For details, please read the International WordPress Sites article on Codex.

Building local packages

When you are ready to build a package for testing or releasing a new version of WordPress in your language, you can use the package build tool located in your local site. The tool is located at “Tools → Translations for <locale>” (where <locale> is your locale code).

Preperation

  1. Check in all updated files into the current branch directory.
  2. If you are using the GlotPress translations, make sure everything is translated at translate.wordpress.org.
  3. Copy the current branch directory and created a new tag directory under locale/tags/X.X.X

Building a Package

  1. Select where you want to get your translations from (.po/.mo files under /messages svn folder or GlotPress).
  2. Locale Branch: This determines the location where your language-specific files are taken from. If you don’t see the branch/tag, you will have to create one in the SVN repository and give it a few minutes. Alternatively, you can build from the trunk for some occasions.
  3. WordPress Branch: This determines where rest of the files are taken from.
  4. WordPress Revision Number: This is used when no tag is specified as WordPress Branch above.
  5. WordPress Version: The version number you would like to use as a part of the package file name. It can be a version number (e.g. 3.0 or 3.0.1) or a combination of a number and type of the release (e.g. 3.0-RC1 or 3.0-beta1).

Once all options are filled out, click the “Build” button at the bottom. The tool will check for errors, and the package will show up at the top of the list on this page if it is sucessfully built.

Releasing new versions

After building a new package, you can share the download URL among your translation team for testing. You can find the URLs under “Link” column on the Translations for <locale> page, in zip or tar.gz format.

If testing goes well and you’re ready to release the final version to the public, simply click the version’s “Release” link under “Action” column. This will mark the official release of that version. Users will be prompted for upgrade of their language package on their dashboard, and download information on your locale site will be updated.

Handbook for WordPress Translators was originally published on Thwin.Net

Handbook for WordPress Translators was originally published on Thwin.Net