Unlike guides in doc/source directory such as
admin, contributor, and user, current build-docs.sh [1]
cannot match pot files from rst files on doc/source folder
such as index.pot generated from "sphinx-build -b gettext"
with doc.po which actually has translated resources on the folder.
This commit patches build-docs.sh to make:
- if there is a corresponding doc-{resname}.po from {resname}.pot,
then matching between those files is correct
- if there is not a corresponding doc-{resname}.po,
then matching with doc.pot is correct.
- enhance a logic to revert po files since there are multiple
po files to be reverted.
Change-Id: I8d1899e9ff6697b9793105dca45b2753a3546266