At the time to which the court or other tribunal has continued the petition, if such court or other tribunal is satisfied that a majority of the resident voters of such town, village or district is still in favor of such change of name and has signed the petition asking therefor, it shall enter an order granting such change, which order shall be recorded in the office of the clerk of such court or other tribunal: Provided, however, That if such town or village has a post office of the same name as the town or village, the court shall not enter such order unless the United States postal authorities shall consent to the same change in the name of the post office. The costs of such change and recording shall be paid by the petitioners. But should it appear to the court or other tribunal that a majority of the resident voters of such town, village or district is not in favor of such change, it shall dismiss the petition, and tax the costs of the proceedings against the petitioners.