[Question]
  [
The residents of Flapus use a base-8 number system. The numbers are:
0 - Kuzla  
1 - Ponara  
2 - Boqkel  
3 - Colopee  
4 - Vruenat  
5 - Foham  
6 - Stikty  
7 - Kricola  
For numbers over 7, the full name of the last digit comes first, followed by apostrophe and the first characters of the other digit(s), up to and including the first vowel:
*11 - Ponara(1)'po(1)  
13 - Colopee(3)'po(1)*
64 - Vruenat'sti  
55 - Foham'fo  
47 - Kricola'vru  
As the numbers go up, the formula stays the same - the full name last digit comes first, followed by an apostrophe and the first characters of the other digits, up to and including the first vowel. Note that apart from the final digit (first word), the order remains the same.
*123 - Colopee(3)'po(1)bo(2)  
205 - Foham(5)'bo(2)ku(0)*
1123 - Colopee'popobo  
7654 - Vruenat'kristifo  
The exception to the rule is for numbers ending in 0. Here the word begins with Ku and is completed with the first letters of the other digits, up to and including the first vowel. No apostrophe is used.
10 - Kupo  
70 - Kukri  
350 - Kucofo  
630 - Kustico  
1000 - Kupokuku  
### Challenge
Write a program or function that accepts a valid base-8 number, and outputs the spoken equivalent. You may assume you will always receive a valid number. Trailing whitepace / single newline after your answer is ok. The first character needs to be upper-case, as per examples.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"). Shortest code in bytes wins. Standard loopholes apply. Answers whose lengths are converted and additionally submitted in Flapussian get extra cookies.
### Test cases
0 -> Kuzla  
1 -> Ponara  
2 -> Boqkel  
3 -> Colopee  
4 -> Vruenat  
5 -> Foham  
6 -> Stikty  
7 -> Kricola  
10 - > Kupo  
11 -> Ponara'po  
23 -> Colopee'bo  
56 -> Stikty'fo  
70 -> Kukri  
100 -> Kupoku  
222 -> Boqkel'bobo  
2345 -> Foham'bocovru  
  
[Answer]
## [Retina](https://github.com/mbuettner/retina/), Colopee'pokri, ~~165~~ ~~157~~ ~~143~~ ~~127~~ 123 bytes
```
(.+)(.)
$2'$1
0
Kuzla
1
Ponara
2
Boqkel
3
Colopee
4
Vruenat
5
Foham
6
Stikty
7
Kricola
(?<='.*[iou])[a-z]+
T`L`l`'.+
zla'
```
The trailing linefeed is significant.
[Try it online!](http://retina.tryitonline.net/#code=KC4rKSguKQokMickMQowCkt1emxhCjEKUG9uYXJhCjIKQm9xa2VsCjMKQ29sb3BlZQo0ClZydWVuYXQKNQpGb2hhbQo2ClN0aWt0eQo3CktyaWNvbGEKKD88PScuKltpb3VdKVthLXpdKwoKVGBMYGxgJy4rCnpsYScK&input=MAoxCjIKMwo0CjUKNgo3CjEwCjExCjIzCjU2CjcwCjEwMAoyMDUKMjIyCjExMjMKMjM0NQo3NjU0)
### Explanation
```
(.+)(.)
$2'$1
```
We start by bringing the trailing digit to the front and inserting an apostrophe after it. Note that this leaves single-digit numbers unchanged, since the regex doesn't match - so those never get an apostrophe in the first place.
```
0
Kuzla
1
Ponara
2
Boqkel
3
Colopee
4
Vruenat
5
Foham
6
Stikty
7
Kricola
```
This replaces each digit with its full name, regardless of where it appears.
```
(?<='.*[iou])[a-z]+
```
This shortens all the digit names that appear after an apostrophe. Note that only the vowels `iou` appear first in a digit name, so we check a position that is right after one of those, *and* after an apostrophe and then match (and remove) all lower case letters that follow that position. Since we've inserted the digit names in title case, this will stop before the next digit.
```
T`L`l`'.+
```
This uses transliteration to turn all upper case characters, `L`, into their lower case counterpart, `l`, provided they are found in a match that starts with `'` (in order to leave the leading capital untouched).
```
zla'
```
The only thing that's left is correctly handling multiples of (octal) 10. In that case, we'll have a result starting with `Kuzla'`, which we want to start with `Ku` instead. So we simply remove all occurrences of `zla'`.
[Answer]
## Pyth, 117 bytes (Kricola'popo)
```
Jc"Ku Po Bo Co Vru Fo Sti Kri";K+kc"nara qkel lopee enat ham kty cola";=TsezIszp@JTp@KTp?&T>sz7\'kVPzpr@JsN0;.?"Kuzla
```
Hand-transpiled to pythonic pseudocode:
```
                                           z = input()      # unevaluated, raw
                                           k = ""
Jc"Ku Po Bo Co Vru Fo Sti Kri";            J = "Ku Po...Kri".split()
K+kc"nara qkel lopee enat ham kty cola";   K = k + "nara...cola".split() # k casted to [""]
=Tsez                                      T = int(end(z))  # end(z) means z[-1]
Isz                                        if int(z):
  p@JT                                         print(J[T])
  p@KT                                         print(K[T])
  p?&T>sz7\'k                                  print("'" if T and s > z else k)
  VPz                                          for N in z[:-1]:  # P(z) is z[:-1]
    pr@JsN0                                        print(J[int(N)].lower())
.?                                         else:
  "Kuzla                                       print("Kuzla")
```
[Answer]
# JavaScript (ES6), 171
```
n=>(x='Kuzla Ponara Boqkel Colopee Vruenat Foham Stikty Kricola ku po bo co vru fo sti kri'.split` `,r=x[d=+(n=[...n]).pop()],n.map(d=>r+=x[+d+8],n[0]?r=d?r+"'":'Ku':0),r)
```
**Test**
```
F=n=>(
  x='Kuzla Ponara Boqkel Colopee Vruenat Foham Stikty Kricola ku po bo co vru fo sti kri'.split` `,
  r=x[d=+(n=[...n]).pop()],
  n.map(d=>r+=x[+d+8],n[0]?r=d?r+"'":'Ku':0),
  r
)  
console.log=x=>O.textContent+=x+'\n'
o=''
for(i=0;i<999;i++)
  o+=i.toString(8) +':'+ F(i.toString(8))+(i%8!=7?' ':'\n')
console.log(o)
```
```
#O { font-size:12px }
```
```
<pre id=O></pre>
```
[Answer]
### Java (1.8) - Vruenat'fobo (~~486~~ 340 bytes)
Just when I thought I couldn't possibly golf this any more, I found another 33 bytes! Very pleased! Biggest savings were from switching to char arrays (shorter to upper/lowercase), and reusing the input string array for the words.
Discovering loads of golfing tricks, down to under 400! In theory I could still reduce this more, as I said a function would be ok in the rules, whereas this is a full program.
**Updated**
Using Martin Büttner's approach, I refactored to use regex instead. Managed to save another 10 bytes! Thanks Martin.
```
interface F{static void main(String[]n){String t="",o,a=n[0];n="Kuzla,Ponara,Boqkel,Colopee,Vruenat,Foham,Stikty,Kricola".split(",");int i=0,l=a.length()-1;char f=a.charAt(l);o=n[f-48]+(l>0?"'":"");while(i<l)t+=n[a.charAt(i++)-48];o+=t.replaceAll("(?<=.*[iou])[a-z]+","").toLowerCase();if(f==48)o=o.replace("zla'","");System.out.print(o);}}
```
### Ungolfed
```
interface Flapus {
static void main(String[] names) {
    String temp="",out, a = names[0];
    names = "Kuzla,Ponara,Boqkel,Colopee,Vruenat,Foham,Stikty,Kricola".split(",");
    int i=0, last = a.length()-1;
    char lastchar = a.charAt(last);
    out=names[lastchar-48]+(last>0?"'":"");
    while(i<last) {
        temp+=names[a.charAt(i++)-48];
    }
    out+=temp.replaceAll("(?<=.*[iou])[a-z]+", "").toLowerCase();
    if (lastchar==48) {
        out=out.replace("zla'","");
    }
    System.out.print(out);
}
}
```
[Answer]
## Python (3.5) ~~225~~ ~~222~~ ~~217~~ 202 bytes
A working solution with list comprehension in python
```
s=input()
d="Kuzla,Ponara,Boqkel,Colopee,Vruenat,Foham,Stikty,Kricola".split(',')
r=d[int(s[-1])]+"'"if s[-1]!='0'else'Ku'
d=[i[:2+(i[2]in'ui')].lower()for i in d]
for i in s[:-1]:r+=d[int(i)]
print(r)
```
## Explanation
```
d="Kuzla,Ponara,Boqkel,Colopee,Vruenat,Foham,Stikty,Kricola".split(',')
```
Win 3 bytes with the split version (previous version: `d="Kuzla","Ponara",...`)
```
r=d[int(s[-1])]+"'"if s[-1]!='0'else'Ku'
```
Initialisation of the result in function of the last digit
```
d=[i[:2+(i[2]in'ui')].lower()for i in d]
```
Change the d list to keep first 2 or 3 characters and put in lower case
```
for i in s[:-1]:r+=d[int(i)]
```
Cat the string
[Answer]
# Javascript ES6, ~~231~~ ~~228~~ ~~225~~ ~~222~~ 204 bytes
```
a=[...prompt(c="Kuzla,Ponara,Boqkel,Colopee,Vruenat,Foham,Stikty,Kricola".split`,`)];b=c[a.pop()];a.length?b=b==c[0]?"Ku":b+"'":0;for(;a.length;)b+=c[a.shift()].match(/.+?[iou]/)[0].toLowerCase();alert(b)
```
Saved a bunch of bytes thanks to Neil.
[Answer]
## F#, ~~364~~ ~~288~~ 250 bytes (Kubofo)
```
let M="Ku-Ponara-Boqkel-Colopee-Vruenat-Foham-Stikty-Kricola".Split '-'
let m="Ku-Po-Bo-Co-Vru-Fo-Sti-Kri".Split '-'
let rec r a=function|0->a|i->r(m.[i%10].ToLower()::a)(i/10)
fun i->String.concat""<|M.[i%10]::((if(i%10)=0 then""else"'")::r[](i/10))
```
Returns a function that takes an integer and returns its Flapus equivalent. =D
[Answer]
## Python 3 - ~~181~~ 177 bytes (Ponara'bosti)
```
a='Ku Po Bo Co Vru Fo Sti Kri zla nara qkel lopee enat ham kty cola'.split()
*y,x=map(int,input())
u=x>0
v=y>[]
print(a[x]+a[x+8]*u**v+"'"*(u&v)+''.join(a[i].lower()for i in y))
```
Beware of the most amazing use of `pow` you will ever see in your entire life. `u**v` is equivalent on boolean context as `u|(not v)` which was previously golfed to the nice `~v+2|u` expression!
]